#13015: d058


scottlu (呂鼎哥)


#include <iostream> 
using namespace std ;
int main () {
	int n ;
	while (cin >> n) {
		if (n>0) {
			cout << "1" << endl ; 
		}
		else if (n==0) {
			cout << "0" << endl ;
		}
		else {
			cout << "-1" << endl ;
		}
	}
	return 0 ;
}
Close
CPP

 

#15169: Re:d058


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)


#include  
using namespace std ;
int main () {
	int n ;
	while (cin >> n) {
		if (n>0) {
			cout << "1" << endl ; 
		}
		else if (n==0) {
			cout << "0" << endl ;
		}
		else {
			cout << "-1" << endl ;
		}
	}
	return 0 ;
}
Close
CPP

 

他說不要用if!!!