Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- float x;
- int main()
- {
- cout << "wprowadz liczbe: " << endl;
- cin >> x;
- if (x != ceil(x)) cout << "liczba nie jest prawidlowa" << endl;
- else if (x >= 1 && x <= 12) cout << "liczba jest prawidlowa" << endl;
- else cout << "liczba nie jest prawidlowa" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment