67 007
Assignments Done
99,2%
Successfully Done
In November 2018

Answer to Question #13470 in C++ for vishal pathak

Question #13470
Q.write a program to asked the user for a number. the program that print a line indicating that the number is greater than 0 or that is not.
Expert's answer
#include <iostream>
using namespace std;


void
main()
{
double x=0;
cout<<"Enter number:
"<<endl;
cin>>x;
if (x>0)

cout<<"Positive"<<endl;
if (x<0)

cout<<"Negative"<<endl;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions