Write a program that accepts a number from the user and chec

Write a program that accepts a number from the user and checks if it is positive, negative, or zero. From flowchart to C++

Solution

#include <iostream>
#include <string>

using namespace std;

int main()
{

int number;
cout<<\"Enter a number : \";
cin>>number;

if(number>0)
   cout<<\"Number is Positive\";
else if(number<0)
   cout<<\"Number is Negative\";
else
   cout<<\"Number is Zero\";

return 0;
}

Write a program that accepts a number from the user and checks if it is positive, negative, or zero. From flowchart to C++Solution#include <iostream> #inc

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site