Answer to Question #20826 in C++ for kimo

Question #20826
write a program that reads astudent number and the hours that the student has completed,and prints his or her classification.a student's classification is based on the following table
freshman Hours<30
sophomore 30<=hours<60
junior 60<=hours <90
senior 90<=hours
1
Expert's answer
2012-12-20T07:44:37-0500
#include <math.h>
#include "iostream"
using namespace std;

int main()
{
int i;
float s=0,k,h;
cout<<"Enter the hours : ";
cin>>i;
if(i<30)
cout<<"freshman"<<endl;
else if(i<60 &&i>30)
cout<<"sophomore "<<endl;
else if(i<90 &&i>60)
cout<<"junior "<<endl;
else if(i>90)
cout<<"senior& "<<endl;


system ("PAUSE");

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS