Advertisement
laith-0093

C++

Jan 16th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <iostream.h>
  2. #include <conio.h>
  3. void main ()
  4. {
  5. int x, y;
  6. L: cout << "\n Enter a number: " ;
  7. cin >> x;
  8. y=x%2;
  9. if (y==0)
  10. cout << " The number is even\n" << endl;
  11. else
  12. cout << " The number is odd\n" << endl;
  13. goto L;
  14. getch ();
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement