摘要: #include<stdio.h> int main() { int a, n, i, s,item; scanf("%d %d",&a,&n); item = a; s=0; for(i=1; i<=n; i++){ s = item+s; item = 10*item+a; } printf(" 阅读全文
posted @ 2022-08-15 14:56 四年yd 阅读(55) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int money,n1,n2,n5,count;/每种硬币至少有一枚,所以本题n1,n2,n5不能=0/ count=0; scanf("%d",&money); if(money<=8||money>=100){ printf("In 阅读全文
posted @ 2022-08-15 14:35 四年yd 阅读(24) 评论(0) 推荐(0)
摘要: #include<stdio.h> double fact(int n); int main() { int i, n; double result; scanf("%d", &n); for(i=1; i<=n; i++){ result = fact(i); } printf("%.0f", r 阅读全文
posted @ 2022-08-15 12:28 四年yd 阅读(44) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> int main() { int i, n; double sum, item; scanf("%d", &n); sum=0; for(i=1; i<=n; i++){ item = sqrt(i); sum = sum+ite 阅读全文
posted @ 2022-08-15 12:26 四年yd 阅读(36) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int i, n, flag; double sum, item; scanf("%d", &n); sum=0; flag=1; for(i=1; i<=n; i++){ item = flag*1.0*i/(2*i-1); flag 阅读全文
posted @ 2022-08-15 12:25 四年yd 阅读(45) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int i, m, n; double sum, item; scanf("%d %d", &m, &n); sum = 0; for(i=m; i<=n; i++){ item = i*i+1.0/i; sum = sum+item; 阅读全文
posted @ 2022-08-15 12:22 四年yd 阅读(30) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { double cost, n; scanf("%lf", &n); if(n<0) { printf("Invalid Value!\n"); } else if(n<=50) { cost = n*0.53; printf("cost 阅读全文
posted @ 2022-08-15 12:21 四年yd 阅读(38) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int Sum, a, b, c, d; double Average; scanf("%d %d %d %d",&a,&b,&c,&d); Sum=a+b+c+d; Average=(a+b+c+d)/4.0; printf("Sum 阅读全文
posted @ 2022-08-15 12:19 四年yd 阅读(58) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> int main() { int i, n; double power; scanf("%d", &n); for(i=0; i<=n; i++){ power=pow(3,i); printf("pow(3,%d) = %.0f 阅读全文
posted @ 2022-08-15 12:10 四年yd 阅读(82) 评论(0) 推荐(0)