c 分 大佬们帮忙看看 谢谢了
查看原帖
c 分 大佬们帮忙看看 谢谢了
1576075
palpitate_sl楼主2024/11/21 21:21
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int a, b, c;
	char ch;
	scanf("%d %d %d", &a, &b, &c); getchar();
	int zj;
	if (a > b)
	{
		zj = a; a = b; b = zj;
	}
	if (a > c)
	{
		zj = a; a = c; c = zj;
	}
	if (b > c)
	{
		zj = b; b = c; c = zj;
	}
	ch = getchar();
	while (ch!= '\n')
	{
		switch (ch)
		{
		case 'A': printf("%d ", a); break;
		case 'B': printf("%d ", b); break;
		case 'C': printf("%d ", c); break;
		default:printf("输入错误");
		}
		ch = getchar();
	}
	return 0;
}
2024/11/21 21:21
加载中...