摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int N, sum, i; /* while(scanf("%d", &N) != EOF)*/ while(scanf("%d", &N) != 0) //输入N值,若 阅读全文
posted @ 2023-05-08 21:01 258333 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> void Up(int speed[]) { int i; for (i = 4; i > 0; i--) { if (speed[i] == 10) { speed[i - 1]++; speed 阅读全文
posted @ 2023-05-08 21:00 258333 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> ////直接计算 //int main() //{ // int j; //第几次卖 // int x = 11; //鱼的条数 // for (j = 5; j >= 2; j--) // { / 阅读全文
posted @ 2023-05-04 21:30 258333 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int a; //红 int b; //白 int c; //黑 int n = 1; //取法个数 printf(" 红 白 黑\n"); for (a = 0; a <= 3; a++) { for (b = 0; b <= 3; 阅读全文
posted @ 2023-04-27 21:57 258333 阅读(24) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int j = 0; int judge(int sweet[]) { int i; for (i = 0; i < 10; i++) { if (sweet[0] != sweet[i]) return 1; } return 0; } void print( 阅读全文
posted @ 2023-04-26 14:30 258333 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include<math.h> int main() { int x1, x2, x3, x5, x8, y1, y2, y3, y5, y8; double max = 0.0, result; for (x8 = 0; x8 <= 2; x8++) for 阅读全文
posted @ 2023-04-25 12:14 258333 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define TAXBASE 3500 typedef struct { long start; long end; double taxrate; }TAXTABLE; TAXTABLE Tax 阅读全文
posted @ 2023-04-25 12:13 258333 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define MAXCHAR 101 //最大允许字符串长度 //将字符转换成数字 int char_to_num(char ch) { if (ch >= '0' && ch <= '9') r 阅读全文
posted @ 2023-04-23 17:13 258333 阅读(6) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int m[10] = {-3,4,7,9,13,45,67,89,100,180}; int low = 0, high = 10 - 1, mid; //low起始位置 high末位置 int a, i, k = -1; //k保存 阅读全文
posted @ 2023-04-21 22:23 258333 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int i, j, n; int m[8] = { 5, 3, 9, 6, 6, 2, 7, 8 }; //要排序的数组 for (i = 0; i < 8; i++) { for (j = 0; j < 7 - i; j++) { i 阅读全文
posted @ 2023-04-20 21:15 258333 阅读(4) 评论(0) 推荐(0) 编辑