#include<iostream> #include<iomanip> using namespace std; int main() { char name; double gpa; int hours; while(cin>>name>>gpa>>hours) { if( hours ==0) { cout<<" New Student "<<name<<" "<<hours<<" "<<gpa<<endl; }else if(( hours ==1) &&(hours <32)) { if((gpa >3.2)&&(hours + 5)) cout<<" Freshman "<<name<<" "<<hours<<endl; cout<<" Sophomore "<<gpa<<endl; }else if(( hours ==32) &&(hours <=60)) { if((gpa >3.2) && (hours + 5)) cout<<" Sophomore "<<name<<" "<<hours<<endl; cout<<" Junior "<<gpa<<endl; }else if(( hours ==61)&& (hours <=90)) { if((gpa >3.2) &&(hours + 5)) cout<<" Junior "<<name<<" "<<hours<<endl; cout<<" Senior "<<gpa<<endl; }else if(hours >90) { cout<<" Senior "<<name<<" "<<hours<<" "<<gpa<<endl; } }
if(( hours ==1) &&(hours <32))if(( hours ==32) &&(hours <=60))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)