64 648
Assignments Done
99,2%
Successfully Done
In September 2018

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
Expert's answer
#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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions