Wednesday, February 7, 2018

write an program to check even or odd using class

#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=";
      }
else
{
cout<<"odd=";
}
  } };
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...