Playground
#include <iostream> using namespace std; int main() { int n; cin >> n; /* samo edna od slednite 3 naredbi za pecatenje moze da se izvrshi */ if (n > 0) cout << "Vnesen e pozitiven broj!" << endl; if (n < 0) cout << "Vnesen e negativen broj!" << endl; if (n == 0) cout << "Vnesen e brojot 0!" << endl; /* if-else */ //ako e brojot deliv so 2, togash e paren if (n%2 == 0) cout << "Vnesen e paren broj!" << endl; else cout << "Vnesen e neparen broj!" << endl; return 0; }
Input data
Program output
5
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!