2022年10月12日

摘要: #include<stdio.h> main() { int n,t; int sum;; sum=0; scanf("%d",&n); for(t=1;t<=n;t+=2) { sum=sum+t; } printf("%d",sum); } 阅读全文

posted @ 2022-10-12 21:32 lachesism 阅读(294) 评论(0) 推荐(0)

摘要: #include<stdio.h> main() { int n,a; a=1; scanf("%d",&n); while(n>10) { n=n/10; a++; } printf("%d",a); } 阅读全文

posted @ 2022-10-12 19:50 lachesism 阅读(115) 评论(0) 推荐(0)

摘要: #include<stdio.h> main() { int n; scanf("%d",&n); while(n>10) { n=n/10; } printf("%d",n); } 阅读全文

posted @ 2022-10-12 19:48 lachesism 阅读(148) 评论(0) 推荐(0)

摘要: #include<stdio.h> main() { int n,a; scanf("%d",&n); a=0; while(n>10) { a=n%10; n=n/10; if(a==0) { continue; } else printf("%d",a); } printf("%d",n); } 阅读全文

posted @ 2022-10-12 19:46 lachesism 阅读(254) 评论(0) 推荐(0)