You are on page 1of 1

#include <iostream>

using namespace std;


int main()
{
int a;
cin>>a;
if(a>0){
cout<<"liczba a jest dodatnia"<<endl;
}
else{
cout<<"liczba a jest ujemna"<<endl;

if(a%2 == 0){
cout<<"liczba a jest parzysta"<<endl;
}
else {
cout<<"liczba a jest nieparzysta"<<endl;
}
return 0;
}

Program sprawdza czy podana liczba a jest dodatnia/ujemna oraz czy jest parzysta/nieparzysta

You might also like