C++ program to claculate percentage and print division of a student when subject marks are given.

#include<iostream.h>
#include<conio.h>
void main(){
float per;
clrscr();
cout<<"Enter Percentage of student"<<endl;
cin>>per;
if(per>=60){
cout<<"I Division "<<per<<"%"<<endl;
}
else{
if(per>=45){
cout<<"II Division "<<per<<"%"<<endl;
}
else{
if(per>=33){
cout<<"III Division "<<per<<"%"<<endl;
}
else{
cout<<"Fail !!"<<per<<"%"<<endl;
}}}
getch();
}

No comments:

Post a Comment