Advertisement
Mashudi

Ganjil Genap

Oct 14th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int x;
  7.         cout << "Masukkan Bilangan sembarang = ";
  8.         cin >> x;
  9.             if(x % 2 == 0)
  10.             {
  11.                 cout << "genap\n";
  12.             }
  13.             else
  14.             {
  15.                 cout << "ganjil\n";
  16.             }
  17.         cout << "\n";
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement