#include "iostream.h"
#include "conio.h"
class per
{
public:
int a;
};
void main()
{
clrscr();
per r;
cout<<"Enter the percentage of a student: ";
cin>>r.a;
if(r.a<0||r.a>100)
cout<<"you entered an invalid input";
else if(r.a<40)
cout<<"The student is failed\n";
else
cout<<"The student is passed\n" ;
getch();
}
Get the executable ( .exe ) file for this program..
Download
0 comments:
Post a Comment