#include <iostream>
using namespace std;
int main( ) {
int num;
// Ask user for input
std:: cout << "Enter a number: " ;
std:: cin >> num;
// Check the number
if ( num > 0 ) {
std:: cout << num << " is positive." ;
} else if ( num < 0 ) {
std:: cout << num << " is negative." ;
} else {
std:: cout << "You entered zero." ;
}
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKICAgIGludCBudW07CgogICAgLy8gQXNrIHVzZXIgZm9yIGlucHV0CiAgICBzdGQ6OmNvdXQgPDwgIkVudGVyIGEgbnVtYmVyOiAiOwogICAgc3RkOjpjaW4gPj4gbnVtOwoKICAgIC8vIENoZWNrIHRoZSBudW1iZXIKICAgIGlmIChudW0gPiAwKSB7CiAgICAgICAgc3RkOjpjb3V0IDw8IG51bSA8PCAiIGlzIHBvc2l0aXZlLiI7CiAgICB9IGVsc2UgaWYgKG51bSA8IDApIHsKICAgICAgICBzdGQ6OmNvdXQgPDwgbnVtIDw8ICIgaXMgbmVnYXRpdmUuIjsKICAgIH0gZWxzZSB7CiAgICAgICAgc3RkOjpjb3V0IDw8ICJZb3UgZW50ZXJlZCB6ZXJvLiI7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0KCgk=
stdin
CiNpbmNsdWRlICZsdDtpb3N0cmVhbSZndDsKCmludCBtYWluKCkgewogICAgaW50IG51bTsKCiAgICAvLyBBc2sgdXNlciBmb3IgaW5wdXQKICAgIHN0ZDo6Y291dCAmbHQ7Jmx0OyAmcXVvdDtFbnRlciBhIG51bWJlcjogJnF1b3Q7OwogICAgc3RkOjpjaW4gJmd0OyZndDsgbnVtOwoKICAgIC8vIENoZWNrIHRoZSBudW1iZXIKICAgIGlmIChudW0gJmd0OyAwKSB7CiAgICAgICAgc3RkOjpjb3V0ICZsdDsmbHQ7IG51bSAmbHQ7Jmx0OyAmcXVvdDsgaXMgcG9zaXRpdmUuJnF1b3Q7OwogICAgfSBlbHNlIGlmIChudW0gJmx0OyAwKSB7CiAgICAgICAgc3RkOjpjb3V0ICZsdDsmbHQ7IG51bSAmbHQ7Jmx0OyAmcXVvdDsgaXMgbmVnYXRpdmUuJnF1b3Q7OwogICAgfSBlbHNlIHsKICAgICAgICBzdGQ6OmNvdXQgJmx0OyZsdDsgJnF1b3Q7WW91IGVudGVyZWQgemVyby4mcXVvdDs7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K
#include <iostream>
int main() {
int num;
// Ask user for input
std::cout << "Enter a number: ";
std::cin >> num;
// Check the number
if (num > 0) {
std::cout << num << " is positive.";
} else if (num < 0) {
std::cout << num << " is negative.";
} else {
std::cout << "You entered zero.";
}
return 0;
}