Question: COSC 1436 Review 1. Using for loop. What is the output for(int i=5; i>=0; i -- ) cout < < pow(i, 2) < < ;

COSC 1436 Review

1. Using for loop. What is the output for(int i=5; i>=0; i -- ) cout<< pow(i, 2) << ;

2. Using while loop. Write a while loop to add up the following numbers: +2/3+3/4+...+99/100

3. Nested for loop

for(int j=3; j>=1; j -- )

{ for(int k=3; k<=5; k++ )

cout<

cout<

}

4.Write a program that asks for the name of a student and the dates and the test scores of the students three tests. It should then report in test score order (best first), the date on which each test score was made, and its score.

5. The grade level of undergraduate students is typically determined according to the following schedule

Less than 32 =Freshman

32-63=Sophomore

64-95 =Junior

96 or more =Senior

Using this information, write a C++ program that accepts the number of credits a student has completed, determine the students grade level and display the grade level.

6.

Write A program that determines which of 5 Countries (China, England, Iceland, India, and USA) had the fewest reported automobile accidents last year. It should have the following two functions, which are called by main.

int get NumAccidents() Is passed the name of a country. It Asks the user for the number of automobile accidents reported in that country during the last year, validates the input, then returns it. It Should be called once for each country.

void findLowest() Is passed the five accident totals. It Determines which is the smallest and prints the name of the country, along with its accident figure.

7.

Write a program that has an array of 20 integer numbers, It should call a function to initialize the array. Then it should call a function to find the smallest and average of the array.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!