Showing posts with label LOOP STATEMENT. Show all posts
Showing posts with label LOOP STATEMENT. Show all posts

Wednesday, 2 May 2012

Program Using SWITCH with CLASS In C++

#include<iostream.h>
#include<conio.h>
class test
{
int a;
public:
{
cout<<"Enter Code=";
cin>>a;
}
void show()
{
  {
case 1:
{
cout<<"Sunday";
break;
}
case 2:
{
cout<<"Monday";
break;
}
case 3:
{
cout<<"Tuesday";
break;
}
{
cout<<"Error In Code";
break;
}
  }
}


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