//给定两个整形变量的值,将两个值的内容进行交换intmain(){int x =0;int y =0;int num =0;scanf("%d,%d",&x,&y);
num = x;
x = y;
y = num;printf("x=%d\ty=%d\n", x, y);system("pause");return0;}
//不允许创建临时变量,交换两个数的内容(附加题)intmain(){int x, y;scanf("%d,%d",&x,&y);
x = x + y;
y = x - y;
x = x - y;printf("x=%d\ty=%d\n",x,y);system("pause");return0;}
//求10 个整数中最大值intmain(){int i =0;int max =0;int arr[10];for(i =0; i <10; i++){scanf_s("%d",&arr[i]);}for(i =0; i <10; i++){if(arr[i]> max){
max = arr[i];}}printf("%d\n", max);system("pause");return0;}
//将三个数按从大到小输出intmain(){int arr[3], t, i, j;for(int i =0; i <3; i++){printf("输入第i个数");scanf("%d",&arr[i]);}for(int i =0; i <3; i++){for(int j = i +1; j <3; j++){if(arr[i]< arr[j]){
t = arr[i];
arr[i]= arr[j];
arr[j]= t;}}}for(int i =0; i <3; i++){printf("%d\t", arr[i]);}system("pause");return0;}
//求两个数的最大公约数intmain(){int x;int y;scanf("%d%d",&x,&y);int i = x;int t = x;for(;;){if(x < y){
i = x;
x = y;
y = i;}
t = x % y;
x = y;
y = t;if(y ==0){printf("最大公约数为:%d\n", x);break;}else(y !=0);continue;}system("pause");return0;}
//给定两个整形变量的值,将两个值的内容进行交换int main() { int x = 0; int y = 0; int num = 0; scanf("%d,%d", &x, &y); num = x; x = y; y = num; printf("x=%d\ty=%d\n", x, y); system("pause"); return 0;}//不允许创建临时变量,交换两个数的内容(附加题)int main() { int x, y; scanf(