摘要: #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 阅读(9) 评论(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 阅读(12) 评论(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 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { double money = 0; int i; for (i = 1; i <= 5; i++) { money =(money + 1000) / (1 + 12 * 0.0063); } printf("%0.2f", money 阅读全文
posted @ 2023-04-19 16:43 258333 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include<math.h> int main() { float a, b, c, d; float f, F; float x = 1.5, x0; printf("输入方程系数:"); scanf_s("%f %f %f %f", &a, &b, &c 阅读全文
posted @ 2023-04-18 21:42 258333 阅读(18) 评论(1) 推荐(0) 编辑
摘要: #include <stdio.h> Fib(int n) //n代表第几个数 { if (n == 1 || n == 2) return 1; else return Fib(n - 1) + Fib(n - 2); } fib(int n) //列出前n个数 { int fib1 = 1, f 阅读全文
posted @ 2023-04-17 21:24 258333 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include<math.h> int main() { int flag = 0; for (int i = 1; i <= 9; i++)//前两位车牌 { if (flag) break; for (int j = 0; j <= 9; j++) //后 阅读全文
posted @ 2023-04-16 22:07 258333 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> typedef struct date { int year, month, day; }DATE; int runYear(int year) { if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) 阅读全文
posted @ 2023-04-14 21:26 258333 阅读(6) 评论(0) 推荐(0) 编辑