I need a solution to these c++ problems

Closed
christanis - Apr 7, 2010 at 06:55 AM
Ambucias Posts 47310 Registration date Monday February 1, 2010 Status Moderator Last seen February 15, 2023 - Apr 7, 2010 at 06:58 AM
Problem 1 (10) Air pressure is a function of altitude h. For each of the following location compute the air pressure p given that the relationship is:
p = 14.7*exp( - 0.000038*h )
Write a program to calculate air pressure p. The program should include:
*
A prompt for inputting data.
*
The printing of input and output data
Problem 2 (10) Write a program to calculate the interest(p) by using formula: p = 100*(1 + 0.05*n), where n - number of years. If n>5 a program calculates the interest by using formula:
p = 100*(1 + 0.05*(5 + 0.02(n - 5))).
Write a program using if - else statement. The program should include:
*
A prompt for inputting data.
*
The printing of input and output data
Problem 3 (20) Write a program that will generate every third integer, beginning with 2 and continuing for all integers that are less than 100. Calculate the sum of those integers that are divisible by 7. Write 3 program:
1.
using while statement,
2.
using do-while statement,
3.
using for statement.
Print the sum on the screen.
Problem 4 (20) An eraser falling out of a window is timed in its fall. Compute the height in feet and in meters from which the eraser fell. The relationship between free-fall distance d in feet and time t in seconds is: d = 16*t2 ( Hint: 1foot = 0.3048 meter). Write a program with a function that calculates distance d. The program should include:
*
A prompt for inputting data.
*
The printing of input and output data
Problem 5 (25) Write a program with a function that searches an integer one-dimensional array List for a value Item and returns its place in the array. If Item is not in the array List, represent the appropriate message. Add to program the function to initialize array and the function to print array. The program should include:
*
A prompt for inputting data.
*
The printing of input and output data
Problem 6 (15) Write a file-oriented program that will process the exam scores given in table:
Adams
45
80
80
100
55
95
Brown
15
75
70
75
55
80
Davis
40
30
10
45
60
55
Fisher
0
5
5
0
10
5
Jones
95
100
100
95
90
90
Represent the table as input file. Determine an average grade for each student and then create output file with the student's name, the individual exam grades and the calculated average

1 response

Ambucias Posts 47310 Registration date Monday February 1, 2010 Status Moderator Last seen February 15, 2023 11,162
Apr 7, 2010 at 06:58 AM
Hello

You request help to solve a complicated problem. Should you wish to increase your chances of receiving an answer, I suggest you ask politely, the least is to say please. Members contributing to this forum do so on their own free time.

Regards
0