Write your question here.
Hello I am in second year of High School in Florida. I am taking a beginners computer class. As part of our final exam, my teacher said we have to work with C++. We have not used the program except to open it but she gave us an example of what the problem might look like when we have the exam. If anyone could help me put it together I would appreciate it. It's not an assignment that's due or anything but I want to know how to do it for my own peace of mind to be ahead of the class. We haven't learned how to code yet but I would like a head start.
Here is the example problem she gave us: "An instructor has asked you to write a program that can tell him if his students have passed or failed his course. He has a file that contains the following information":
* First name
* Last name
* Five quiz grades
* The midterm exam grade
* The final exam grade
Your program must read these values into variables then use those variables to calculate the final average and finally display that average to the screen.
Requirements:
1. Your program must calculate the final average including those quizzes. All the quizzes averaged together count as much as a test. So calculate the final quiz average, then average the midterm+final+quiz average.
2. Display the student's last name first, comma, space and first name. Follow that with the final average as a whole number, rounded up
Here's how it should appear on the output screen: ex.
I'm not sure that focussing upon a specific program at this point would be very useful. If you really want to get a head start, you could focus on getting a solid understanding of the fundamentals.
http://www.cplusplus.com/doc/tutorial/
The tutorial pages would be a good start, and with reference to file use, note at the bottom of that page, the sub-topic titled "Input/Output with files".
I read through the tutorial and it was very helpful. Thank you Chervil. I don't quite understand the language yet but i'm trying to get the concepts down. As for the example I gave above, I would like to understand how to do it and where to begin.
Start by laying out a basic, minimal program. For example, the hello world program without the hello world. Then try and go from there and post here when you get stuck.
The next stage is to compile it. The compiler helps you by displaying error messages for code which is invalid, as well as warnings for code which may be valid, but is possibly incorrect or unsafe.