Monday, February 5, 2018

write an program to check even or odd using class in c++

#include<iostream.h>
#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:

Balkrishna Bhandari, : 8085 microprocessor program

Balkrishna Bhandari, : 8085 microprocessor program : write an assemble language program to add two 8-bit data 32H and 44H store result at 20...