#include <stdio.h>
main ()
{
int a, b, max;
printf("Input a, b:");
while(scanf("%d,%d", &a, &b)!=EOF){
if (a>b)
max=a;
if (a<=b)
max=b;
printf("max=%d\n", max);}
}
知识点:选择控制结构
#include <stdio.h>
main ()
{
int a, b, max;
printf("Input a, b:");
while(scanf("%d,%d", &a, &b)!=EOF){
if (a>b)
max=a;
if (a<=b)
max=b;
printf("max=%d\n", max);}
}
知识点:选择控制结构