Wednesday, April 7, 2021

simple program (POP) (44)

 #include<iostream>

using namespace std;

int main()

{

int no;

cout<<"please enter a number for check the number is positive,negative or zero:"<<endl;

cin>>no;

if(no>=1 && no<=9)

{

cout<<"you enter a positive  number:";

}

else if(no<0)

{

cout<<"you enter a negative number:";

}

else

{

cout<<"you enter a zero";

}

}

No comments:

Post a Comment