摘要:
z 1 #include <stdio.h> 2 3 double f(double *p, double x); 4 int main(void) 5 { 6 7 double an[4]; 8 double a, b; 9 for (int i = 3; i >= 0; i--) 10 { 11 阅读全文
摘要:
1 #include <stdio.h> 2 3 int main(void) 4 { 5 int num; 6 int n, sum; 7 8 n = 0; 9 sum = 0; 10 scanf("%d", &num); 11 12 do 13 { 14 sum = sum + num % 10 阅读全文
摘要:
1 #include <stdio.h> 2 3 int main(void) 4 { 5 int a, b; 6 int t; 7 int month; 8 int amount; 9 10 scanf("%d", &amount); 11 12 a = 0; 13 b = 1; //初始化,第一 阅读全文
摘要:
1 #include <stdio.h> 2 3 int main(void) 4 { 5 int m, n; 6 int gcd, lcm; 7 scanf("%d %d", &m, &n); 8 int t1 = m; 9 int t2 = n; 10 11 int t; 12 if (m < 阅读全文
摘要:
1 #include <stdio.h> 2 3 int main(void) 4 { 5 int num; 6 int sum = 0; 7 while (1) 8 { 9 scanf("%d", &num); 10 if (num <= 0) 11 { 12 break; 13 } 14 els 阅读全文
摘要:
1 #include <stdio.h> 2 3 int main(void) 4 { 5 int magic_number, n; 6 int guess_number; 7 int count = 0; 8 9 scanf("%d %d", &magic_number, &n); 10 11 d 阅读全文
摘要:
1 #include <stdio.h> 2 #include <math.h> 3 int main(void) 4 { 5 double x, y; 6 7 scanf("%lf", &x); 8 9 /*浮点数比较大小*/ 10 if (fabs(x - 15.0) > 1e-6 && x > 阅读全文
摘要:
1 #include <stdio.h> 2 3 int main(void) 4 { 5 int a, b, c; 6 char other; 7 8 scanf("%d %d %d", &a, &b, &c); 9 10 if (a == b) 11 { 12 other = 'C'; 13 } 阅读全文
摘要:
程序只验证了样例。 1 #include<stdio.h> 2 3 int main(void) 4 { 5 int a[101] = { 0 }; 6 int b[101] = { 0 }; 7 8 int m, n; 9 10 for (int i = 0; i < 2; i++) 11 { 1 阅读全文
摘要:
思路:每次找出数组中最大的数,放到后面。 1 #include<stdio.h> 2 3 int max_index(int a[], int len); 4 int main(void) 5 { 6 int a[] = { 2,45,6,12,87,34,90,24,23,11,65 }; 7 i 阅读全文