Write a program to determine whether a number is even or odd

A number is taken from user and determined weather even or odd.


Select To use this code as it is.. select and copy paste this code into code.cpp file :)



  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int n;
  7. cout<<"Enter no.: ";
  8. cin>>n;
  9. //Coding by: Snehil Khanor
  10. //http://WapCPP.blogspot.com
  11. if(n%2==0)
  12. cout<<"EVEN";
  13. else
  14. cout<<"ODD";
  15. getch();
  16. }

Check out this stream