#include<iostream>
using namespace std;
int main()
{
char n;
int a = 0, b = 0, c = 0;
while (cin>> n)
{
switch (n)
{
case'A':
a += 1;
printf("A%d\n", a);
break;
case'B':
b += 1;
printf("B%d\n", b);
break;
case'C':
c += 1;
printf("C%d\n", c);
break;
}
}
}
用switch语句完成银行叫号机
最新推荐文章于 2024-08-10 14:33:15 发布