write a program to display numbers upto even numbers upto 50

Even numbers upto 50 are displayed.


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. for(int i=1;i<=50;i++)
  7. //Coding by: Snehil Khanor
  8. //http://WapCPP.blogspot.com
  9. {if(i%2==0)
  10. cout<<i;
  11. cout<<"\n";
  12. }
  13. getch();
  14. }

Check out this stream