我想找到两个数字的最大值,然后打印出来。我想要打印所有三个数字。我使用以下代码。
#include<stdio.h>
#include<conio.h>
main()
{
//clrscr();
int a,b,c;
printf("insert two numbers:");
scanf("%d%d", &a, &b);
c = (a>b) ? a : b;
printf("\nmaximum of %d",a," and %d",b," is = %d" c);
getch();
}
但是,我收到两个语法错误(请参见附图)。 有人可以帮帮我吗?
答案 0 :(得分:16)
答案 1 :(得分:3)
printf("\nmaximum of %d and %d is = %d",a,b,c);