#include<conio.h>
#include<stdio.h>
class check
{private:int x;
public:void get()
{ cout<<"enter any number:";
cin>>x;
}
void show()
{ if(x%2==0)
{ cout<<"even="<<x;
}
else
{
cout<<"odd="<<x;
}
};
void main()
{check c;
clrscr();
c.get();
c.show();
getch();
}
No comments:
Post a Comment