0

write a c++ program to input an integer value and check if it is positive or negative.

6th Dec 2016, 10:21 AM
Vishal Sharma
Vishal Sharma - avatar
3 Respuestas
+ 6
#include <iostream> using namespace std; int main() { int number; cin>>number; if(number<0) cout<<"Your number is negative"; else cout<<"Your number is positive"; return 0; }
6th Dec 2016, 11:05 AM
Filip
Filip - avatar
0
ty
6th Dec 2016, 2:44 PM
Vishal Sharma
Vishal Sharma - avatar
0
ek galti h agar kisi ne no. zero dal dia to program fail
6th Dec 2016, 3:35 PM
Abhilash Chaudhary
Abhilash Chaudhary - avatar