#include<iostream>
using namespace std;
int main() {
int x;
cout << "Enter a number:";
cin >> x;
if (x<0)
{
cout <<x<<" is a negative number.";
}
else if (x>0)
{
cout <<x<< " is a positive number.";
}
return 0;
}
Code Example |
---|
Cpp :: hello command not printing in c++ |
Cpp :: compile c++ MPI Program |
Cpp :: int a=0; int b=30; |
Cpp :: print all chrchetrs of a string c++ |
Cpp :: cuda atomic swap |
Cpp :: c++ ascii value |
Cpp :: scope resolution operator in c++ |
Cpp :: pointers in c++ |
Cpp :: strip whitespace c++ |
Cpp :: binpow in fenwick tree |
Cpp :: function template in c++ |
Cpp :: cpp tutorial |
Cpp :: |