摘要: 把316分解为两个数之和,这两个数分别能被11和13整除 1 #include <stdio.h> 2 int main() { 3 int i=0,j,k; 4 do { 5 i++; 6 k=316-13*i; 7 } while(k%11); 8 j=k/11; 9 printf("316=1 阅读全文
posted @ 2019-04-17 16:48 cxc1357 阅读(169) 评论(0) 推荐(0)
摘要: 程序: #include<stdio.h> int main() { int a,b,hour,min; scanf("%d%d",&a,&b); hour = a / 100; //输入的小时数 min = a % 100; //输入的分钟数 min = 60 * hour + min + b; 阅读全文
posted @ 2019-04-17 13:48 cxc1357 阅读(377) 评论(0) 推荐(0)
摘要: 程序: #include<stdio.h> int main() { double s,w; int t; scanf("%lf %d",&s,&t); if(s <= 3) w = 10; else if(s > 3 && s <= 10) w = 10 + (s-3) * 2; else w = 阅读全文
posted @ 2019-04-17 13:47 cxc1357 阅读(325) 评论(0) 推荐(0)
摘要: 程序: #include<stdio.h> int main() { int a,b; char c; scanf("%d",&a); while(scanf("%c",&c)) { switch(c) { case('+'):scanf("%d",&b);a+=b;break; case('-') 阅读全文
posted @ 2019-04-17 13:44 cxc1357 阅读(880) 评论(0) 推荐(0)
摘要: 程序: #include<stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a-b == 0) printf("%c",'C'); else if(a-c == 0) printf("%c",'B'); else printf 阅读全文
posted @ 2019-04-17 13:43 cxc1357 阅读(198) 评论(0) 推荐(0)
摘要: 程序: 1 #include <stdio.h> 2 int main() 3 { 4 int num, times; 5 scanf("%d %d", &num,&times); 6 7 int i = 0, guess; 8 while(i< times){ 9 scanf("%d", &gue 阅读全文
posted @ 2019-04-17 13:42 cxc1357 阅读(1771) 评论(0) 推荐(0)
摘要: 我的程序: #include<stdio.h> #include<math.h> int main(){ int n,a,b,s=0,t; scanf("%d",&n); a = (int)log10(n) + 1; b = a; while(b>1){ b--; t = pow(10,b); s 阅读全文
posted @ 2019-04-17 13:40 cxc1357 阅读(652) 评论(0) 推荐(0)
摘要: 程序: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define N 50 4 5 int main() { 6 char pinyin[][5] = {"ling","yi","er","san","si","wu","liu","qi","ba","j 阅读全文
posted @ 2019-04-17 13:39 cxc1357 阅读(1051) 评论(0) 推荐(0)
摘要: 程序: 方法1: 1 #include <stdio.h> 2 #define N 10000 3 int main(){ 4 long n, temp; 5 long mask=1; 6 scanf("%ld", &n); 7 temp = n; 8 while(temp/10 != 0){ 9 阅读全文
posted @ 2019-04-16 22:47 cxc1357 阅读(1334) 评论(0) 推荐(0)
摘要: 程序: 1 #include<stdio.h> 2 3 int main() { 4 int i,n,s = 1; 5 scanf("%d",&n); 6 for(i=1; i<n; i++) { 7 s = (s+1)*2; 8 } 9 printf("%d",s); 10 } 阅读全文
posted @ 2019-04-16 22:00 cxc1357 阅读(720) 评论(0) 推荐(0)