目录
题干
题目描述
输入一个正整数 repeat (0
输入
见sample
输出
见sample
样例输入
3
2 -8 0
样例输出
1
-1
0
源代码
#include <stdio.h>
int main()
{
int i,repeat;
scanf("%d",&repeat);
while(repeat--)
{
int x;
scanf("%d",&x);
if(x>0)
printf("1\n");
else if(x==0)
printf("0\n");
else
printf("-1\n");
}
return 0;
}
//ENDING
解题思路
呵呵
呵呵呵
这道题没有任何解题思路可言
希望你们喜欢这道题还有我的解题思路(呵呵)!!!
如有问题请留言,谢谢!!!