Advertisement
rikardoricz

2 IF Tomasz Świątek 3BTI/2

Nov 17th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float x;
  8.  
  9.     cout << "Podaj liczbe: " << endl;
  10.     cin >> x;
  11.  
  12.     if (x>7)
  13.     {
  14.         cout << "Podana liczba jest wieksza od 7";
  15.     }
  16.     else if (x<7)
  17.     {
  18.         cout << "Podana liczba jest mniejsza od 7";
  19.     }
  20.     else
  21.     {
  22.         cout << "Podana liczba jest rowna 7";
  23.     }
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement