Purpose: To determine data requirements.
To read input.
To process and output data.
To document a program.
Program: Write a program that predicts the score needed on a final exam to achieve a desired grade in a course. The program should interact with the user as follows:
Enter Desired grade: B
Enter minimum average required: 79.5
Enter current average in course: 74.6
Enter how much the final counts as a percentage of the course grade: 25
You need a score of 94.20 on the final to get a B.
[79.5 - 75(.746)] * 4
this is waht his example works out to i need the formula
Enter Desired grade: B
Enter minimum average required: 79.5
Enter current average in course: 74.6
Enter how much the final counts as a percentage of the course grade: 25
You need a score of 94.20 on the final to get a B.
[79.5 - 75(.746)] * 4
Here is a much more smaller program that gives you the required output. No check is done for Desired grade checking. You do that.
Yes you better follow the guidelines laid down by Wolfpack to solve your problem but while finalizing your code just replace the [inlinecode] scanf[/code] with either getchar () for gettign a character or fgets ( ) while getting a string.
scanf is a prettly complex function and leaves the input stream dirty with the junk.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.