Hey, first off I would recommend that you use code tags. You can edit your post (the "Edit" button at the bottom of it) and select all your code and click the first button in the format toolbar.
Secondly, what is the problem: Is it not compiling or is it just not doing what you want it to do? Please ask specific questions.
// Fixed the typos into mine to make it more easier to answer your question.
// The code was sightless edited to make it able to being compiled.
// Just, fix your typos.
#include <iostream>
usingnamespace std;
int main () {
int midterm;
int research;
int homework;
int project; // You forgot to declare it, so I added it here. Assume that it used to be an integer.
cout << "Please enter your midterm grade\n";
cin >> midterm;
cout << "Please enter your project average\n";
cin >> research; // "project" or "research?
cout << "Please enter your homework average\n";
cin >> homework;
if(midterm > project) {
if(midterm >= homework) {
cout << "Your Highest Grade Is: "<<midterm;
}
if(research <= homework) {
cout << "Your Lowest Grade Is : " << project;
}
else cout << "Your Lowest Grade Is : " << homework;
}
else {
cout << "Your Highest Grade Is : " << homework;
cout << "Your Lowest Grade Is : " << project;
}
else {
if(project >= homework) {
cout << "Your Highest Grade Is : " << project;
}
if(midterm <= homework)
cout << "Your Lowest grade Is : " << midterm;
else
cout << "Your Lowest Grade Is : " << homework;
}
}
You don't need to write the same code over and over again to make it respondable when user didn't type anything, you can use while-loop to solve this.
Example at here: http://ideone.com/ZomHOT (what was that "ZomHOT"...)
Just having 2 errors first time submitting, both forgetting to type a symbol into it. (First one is forgetting "(", another is semicolon) And after editing the code works perfectly, just ignore those warnings.
Other than that, I think there is no problem now, except the confusion of the "project" and "research".
If you still have questions, fell free to ask me. ;)
Im trying to figure out this sorry I thought it all went in thank you for your help.
. Computes the student's current overall weighted average and displays it:
Your current average is XX%
according to the following percentages:
Midterm 20% Project 40% Homework 15%.
That is, here are a few scenarios that you should use as test cases.
Midterm 100 70 80 0 60 100
Project 100 70 70 70 70 0
Homework 100 70 60 70 80 0
Weighted Average 75% 52.5% 53% 38.5% 52% 20%
Note: due to the way the weighted average is computed, the resultant value will always be in the range 0-75%.
5. Computes the minimum grade that the user would need to earn on the final exam to receive a 70% for the course.
Clearly, the final exam is worth 25% of the course grade. Three outcomes are possible; you must determine and
display one of the following:
You need to earn a grade of XX% on the final to have 70% for the course.
You do not need to take the final to earn 70% for the course.
No matter what you earn on the exam, you cannot earn 70% for the course.
Apply algebra to think of how to solve for the percentage needed to attain a 70% average overall. You should use
computations similar to the weighted calculation discussed above.
Specifications
• Assume that the grades that are input are legal; that is, they are within the range 0 to 100, inclusive. We will
study how to do error checking later.
• Your program input / output must match exactly what I have stated above.
Recommendations
• Before coding, work out on paper how you will determine 70% average overall.
• Treat the overall percentage you calculate as an integer as opposed to a real number (use 63.5 as opposed to
0.635).
• Be thorough in your testing because it is my job to try and break your code.
Submitting
Your program must use the standard comment at the top of the page as well as a reasonable amount of comments
throughout the program.