Advertisement
Mashudi

Pemeriksa Bilangan

Oct 14th, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int x,y;
  7.         //masukkan bilangan bulat positif atau negatif
  8.         cout << "Bilangan Pertama = ";
  9.         cin >> x;
  10.         cout << "Bandingkan dengan \n" << "Bilangan Kedua = ";
  11.         cin >> y;
  12.         cout  << "Nilai " << x << " terhadap " << y << " adalah = ";
  13.             if(x >= y)
  14.             {
  15.                 cout << "Lebih Besar";
  16.             }
  17.             else
  18.             {
  19.                 cout << "Lebih Kecil";
  20.             }
  21.         cout << "\n";
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement