Percentage coding Using C++

//this program is to find in which division they have passed....
#include<iostream>
using namespace std;
int main()
{
float percent;
int x;
cout<<"\n a program made by zen_master_3429";
cout<<"\n Enter your percentage: ";
cin>>percent;
cout<<"You had score"<<percent<<"%"<<endl;
x=percent/10;
switch(x)
{
case 10:
case 9:
cout<<"\n You're passed with distinction";
cout<<"\n Have a funday Congrats";
break;
case 8:
case 7:
case 6:
cout<<"\n You're passed with the second division'";
cout<<"\n Somewhat you have missed in the top.Don't worry be chill";
break;
case 5:
case 4:
cout<<"\n You had passed with the third division";
break;
default:
cout<<"\n I feel very sorry to say that..........................";
break;
}
return 0;
}



Comments

Popular Posts