解题思路:
注意事项:
参考代码:
#include<stdio.h> #define ch(a,b) a^=b,b^=a,a^=b; int main() { int i,ls[9]; for(i=0;i<9;i++){ scanf("%d",&ls[i]); } ch(ls[1],ls[3]) ch(ls[2],ls[6]) ch(ls[5],ls[7]) printf("%d %d %d\n",ls[0],ls[1],ls[2]); printf("%d %d %d\n",ls[3],ls[4],ls[5]); printf("%d %d %d\n",ls[6],ls[7],ls[8]); return 0; }
0.0分
0 人评分
核桃的数量 (C语言代码)浏览:872 |
蚂蚁感冒 (C语言代码)浏览:775 |
C二级辅导-统计字符 (C语言代码)浏览:481 |
快速排序算法1浏览:885 |
2004年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:609 |
简单的a+b (C语言代码)浏览:244 |
A+B for Input-Output Practice (III) (C++代码)浏览:565 |
回文数字 (Java代码)浏览:642 |
简单的a+b (C语言代码)浏览:466 |
WU-数字整除 (C++代码)浏览:1583 |