mitkonikov

Eva Homework 1

Mar 1st, 2019
159
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.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cout << "Vnesi cel broj: ";
  9.     cin >> n;
  10.  
  11.     if (n < 0) {
  12.         cout << "Brojot " << n << " e negativen!" << endl;
  13.     } else {
  14.         if (n % 2 == 0) {
  15.             cout << "Brojot " << n << " e pozitiven i paren!" << endl;
  16.         } else {
  17.             cout << "Brojot " << n << " e pozitiven i neparen!" << endl;
  18.         }
  19.     }
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment