Wednesday, 2 May 2012

Program Of IF Else Statement With Class In C++

#include<iostream.h>
#include<conio.h>
{
private:
int a;
public:
void getdata()
{
cout<<"Enter Marks=";
cin>>a;
}
void show()
{
if(a>=40)
{
if(a>=60)
{
if(a>=80)
{
}
else
{
  cout<<"\n First";
}
}
else
{
if(a>=50)
{
cout<<"\n Good Second";
}
else
{
  cout<<"\n Second";
}
}
}
else
{
{
cout<<"\n Poor";
}
else
{
  cout<<"\n V.poor";
}
}

}


};
main()
{
test t1;
clrscr();
t1.show();
getch();
}

No comments:

Post a Comment