#include<stdio.h> int main() { int a,b,c,d,max; scanf("%d,%d,%d,%d",&a,&b,&c,&d); max = a; if (max < b) max = b; if(max < c) max = c; if(max < d) max = d; printf("max=%d\n",max); return 0; }
#include<stdio.h> int main() { int temp; int i; int temp1=0,temp2=0,max=0,min=0; for(i=0;i<6;i++) { scanf("%d",&temp); } if(temp>=max){temp1=temp;temp=max;max=temp1;} if(temp<=min){temp2=temp;temp=max;max=temp2;} printf("%d %d\n",max,min); return 0; }