Advertisement
Mashudi

Menentukan Bentuk Zat (air)

Oct 14th, 2014
246
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;
  7.         cout << "Masukkan Suhu Zat Anda (C) = ";
  8.         cin >> x; //variable untuk suhu suatu zat, masukkan bilangan bulat positif atau negatif
  9.         cout << "Suhu zat Anda adalah " << x << " (C) Maka bentuk zat tersebut adalah ";
  10.             if(x <= 0) //berdasarkan titik beku air
  11.             {
  12.                 cout << "Beku";
  13.             }
  14.             else
  15.             {
  16.                 cout << "Cair";
  17.             }
  18.         cout << "\n";
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement