I have a class project that requires loops and nested loops...I think it'll be much easier if I showed you:
PLEASE READ CAREFULLY!
At Valence community college, a student can’t take more than 2 courses under the constraint of having no more than 6 credit hours. The purpose of this assignment is to construct a fee invoice for a student. This requires the input of Student’s id as integer and the course numbers.
It costs 120.25 dollars per credit hour in addition to $35.00 charged for health and id services.
Here is the list of all courses Valence Community College offers:
--------------------------------------
Total Payments $ 756.50
See sample run for more details.
Sample Run 1 (The user’s entry is in bold)
Enter the Students Id
5656
Enter how many courses-up to 2
5
Sorry you can’t take more than 2 courses. Try again
2
Enter the 2 course number(s)
4587 9696
Sorry you can’t cumulate more than 6 credit hours!
Enter C/c to enter the course number(s) for this student
Enter P/p to process new student
Enter E/e to exit program
C
Enter the 2 course number(s)
4599 9696
Thank you!
Here is the fee invoice
VALENCE COMMUNITY COLLEGE
ORLANDO FL 10101
---------------------
}
else
{
cout<<"\nEnter both course codes : ";
cin>>course1>>course2;
}
cout <<"\nSorry, but no more than 6 credits hours permitted\n\n";
cout <<"\nEnter C enter the course number(s) for this student\n";
cout <<"Enter P to process a new student\n";
cout <<"Enter E to Exit Program : ";
cin>>answer;
}while(toupper(answer)=='C');
}while(toupper(answer)=='P');
Any chance you could edit the post with the code in to format it ?
Put a [C0de] tag beore the code and [/C0de] tag (but use o not 0) after (or select and hit the # format button to get code like
1 2 3 4 5
int main()
{
//This code does nothing!
return 0;
}
You will probably have to fix the indentation manually.
It makes the code much easier to read, and so greatly improves your chances of helpful responses (and the line numbers help people to pinpoint errors and changes).