UVA 621-Secret Research
题目大意:按要求输出+—*?
解题思路:按要求读字符串即可
#include <stdio.h>
#include <iostream>
#include <string.h>
using namespace std;
int main() {
int n;
cin >> n;
getchar();
while(n--) {
char a[1000];
gets(a);
if(!strcmp(a, "1") || !strcmp(a, "4") || !strcmp(a, "78"))
printf("+\n");
else if(a[strlen(a)-2] == '3' && a[strlen(a)-1] == '5')
printf("-\n");
else if(a[0] == '9' && a[strlen(a)-1] == '4')
printf("*\n");
else if(a[0] == '1' && a[1] == '9' && a[2] == '0')
printf("?\n");
}
return 0;
}