Nitin400

a program that above if number entered by user is positive o

Jun 6th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int num;
  6.     cout<<"Enter number: ";
  7.     cin>>num;
  8.     if(num>0)
  9.     {
  10.         cout<<"number is positive";
  11.     }
  12.     else if(num<0)
  13.     {
  14.         cout<<"number is negative";
  15.     }
  16.     else
  17.     {
  18.         cout<<"number is zero";
  19.     }
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment