我不知道为什么进不了循环
这个是题目Your roommate is not very familiar with Chinese Railway, and always get confused what the train number means. Now it's time to help him out.
In China, train number contains a lot of information. In this problem, you are supposed to answer the type of train. Train numbers are mainly numbered in following rules:
1. In this problem, you are given a train number containing 2~5 character, where the first character can be either digits or upper-case letter, and other characters are all digits.
2. If the first character is a letter, the train type is determined by the first letter:
'K': Rapid
'T' or 'Q': Express
'Z': SuperExpress
'D': EMUExpress
'G' or 'C': HighSpeed
3. If the first character is a digit, the train type is determined by the integer S the train number forms. To simplify the problem, you may assume:
1000 <= S < 6000: Semi-fast
S >= 6000: Local
And you may assume that no test case will contain any string that was not mentioned in the description.
Input
First line: number of test cases T;
2 ~ T+1 line: Train number.
Output
For each case, output the train type described before.
ATTENTION: Don't modify the names, or you will get WA, copying and pasting them are strongly recommended.
Sample Input
3
4419
Z61
G101
Sample Output
Semi-fast
SuperExpress
HighSpeed
这是我的程序
int main(int argc, char* argv[])
{
int m,i;
char c;
scanf("%d",&m);
for(i=1;i<=m;i++)//我的问题是为什么进不去循环啊
{
getchar(c);
switch(c)
{
case 'K':printf("Rapid");break;
case 'T':case 'Q':printf("Express");break;
case 'Z':printf("SuperExpress");break;
case 'D':printf("EMUExpress");break;
case 'G':case 'C':printf("HighSpeed");break;
case '1':case '2':case '3':case '4':case '5':case '6':printf("Semi-fast"); break;
default:printf("Local");
}
}
return 0;
}