摘要: 1、 #include <stdio.h> int main(void) { int a[7] = {100,200,300,400,500,600,700}; int i; for (i = 0; i < 3; i ++) { int temp = a[i]; a[i] = a[6 - i]; a 阅读全文
posted @ 2021-01-08 23:33 小鲨鱼2018 阅读(1412) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(void) { int a[5]; int i; for (i = 0; i < 5; i ++) { printf("a[%d] : ", i); scanf("%d", &a[i]); } puts("\n "); for (i = 0; 阅读全文
posted @ 2021-01-08 22:46 小鲨鱼2018 阅读(3822) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(void) { int a[4] = {22,11,99,77}; int b[4]; int i; for (i = 0; i < 4; i ++) b[i] = a[i]; puts(" a b"); for (i = 0; i < 4; 阅读全文
posted @ 2021-01-08 22:35 小鲨鱼2018 阅读(1144) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int v[5]; v[0] = 1; v[1] = 2; v[2] = 3; v[3] = 4; v[4] = 5; printf("v[0] = %d\n", v[0]); printf("v[1] = %d\n", 阅读全文
posted @ 2021-01-08 20:38 小鲨鱼2018 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int i, j, x, y, z; do { puts("please input an integer."); printf("x = "); scanf("%d", &x); } while (x < 0 || x 阅读全文
posted @ 2021-01-08 16:17 小鲨鱼2018 阅读(1023) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(void) { int i, j; for (i = 1; i <= 9; i ++ ) { for (j = 1; j <= 9; j ++) { int k = i * j; if (k % 10 == 4 || k / 10 == 4) 阅读全文
posted @ 2021-01-08 14:45 小鲨鱼2018 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int i, j, len; puts("please input the len."); printf("len = "); scanf("%d", &len); for (i = 1; i <= len; i ++ ) 阅读全文
posted @ 2021-01-08 13:22 小鲨鱼2018 阅读(1667) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int i, j, len; puts("please input the len."); printf("len = "); scanf("%d", &len); for (i = 1; i <= len; i ++) 阅读全文
posted @ 2021-01-08 13:06 小鲨鱼2018 阅读(3735) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int i, j; for (i = 1; i <= 9; i ++) { for (j = 1; j <= 9; j ++) { printf("%3d", i * j); } putchar('\n'); } retu 阅读全文
posted @ 2021-01-08 11:18 小鲨鱼2018 阅读(242) 评论(0) 推荐(0) 编辑