JakubKaczmarek_123

zadanie 18

Nov 13th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. float x;
  5.  
  6. int main()
  7. {
  8.     cout << "wprowadz liczbe: " << endl;
  9.     cin >> x;
  10.     if (x != ceil(x)) cout << "liczba nie jest prawidlowa" << endl;
  11.     else if (x >= 1 && x <= 12) cout << "liczba jest prawidlowa" << endl;
  12.     else cout << "liczba nie jest prawidlowa" << endl;
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment