The grade level of undergraduate students is typically determined according to the following schedule
Number of Credits Completed Grade Level
Less than 32 Freshman 32 – 63
Sophomore 64 – 95
Junior 96 or more Senior
Using this information, write a C++ program that accepts the number of credits a student has completed, determine the student’s grade level and display the grade level.
Expert Answer
Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: The grade level of undergraduate students is typically determined according to the following schedule…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Note: The minimum and maximum value of no. of credits have been assumed as 0 and 100 as they were not mentioned in the question.In case they have different values kindly make changes accordingly. // PROGRAM #include<iostream> using namespace std; int main() { int no_of_credits; cout<<"nEnter your No. of credits: "; //Accepting input cin>>no_of_credits; if(no_of_credits>=96 && no_of_credits<=100) //Calculating Grade level cout<<"Your Grade Level is Senior ."; //Displaying Grade level
else if(no_of_credits>=64 && no_of_credits<96) cout<<"Your Grade Level is Junior."; else if(no_of_credits>=32 && no_of_credits<64) cout<<"Your Grade Level is Sophomore."; else if(no_of_credits<32 && no_of_credits>=0) cout<<"Your Grade Level is Freshman"; else // Checking for invald inputs cout<<"Invalid No. of credits.."; return 0; }