会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ykznlxx
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
32
33
34
35
36
37
38
39
下一页
2023年5月25日
第33天打卡
摘要: 问题: 源代码: #include<stdio.h> int main() { long int a,b,c; scanf("%ld/%ld",&a,&b); while(1) { if(b%a) c=b/a+1; else { c=b/a; a=1; } if(a==1) { printf("1/
阅读全文
posted @ 2023-05-25 21:02 皮卡丘和杰尼龟
阅读(12)
评论(0)
推荐(0)
2023年5月24日
第32天打卡
摘要: 问题: 源代码: #include<stdio.h> int main() { int in ,i,max,min,sum; max=-32768; min=32767; sum=0; for(i=0;i<10;i++) { printf("Input number %d: ",i); scanf(
阅读全文
posted @ 2023-05-24 21:38 皮卡丘和杰尼龟
阅读(11)
评论(0)
推荐(0)
2023年5月23日
第31天打卡
摘要: 问题: 求两个正整数的最小公倍数 源代码: #include <stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); int m=(a>b?a:b); while(1) { if(m%a==0&&m%b==0) { break; } m++; } pr
阅读全文
posted @ 2023-05-23 22:42 皮卡丘和杰尼龟
阅读(12)
评论(0)
推荐(0)
2023年5月22日
第30天打卡
摘要: 问题: 求两个正整数的最大公约数 源代码: #include<stdio.h> int main() { int m,n,temp,i,k; scanf("%d%d",&m,&n); if(m<n) { temp=m; m=n; n=temp; } for(i=1;i<n;i++) if(m%i==
阅读全文
posted @ 2023-05-22 19:25 皮卡丘和杰尼龟
阅读(17)
评论(0)
推荐(0)
2023年5月21日
第29天打卡
摘要: 问题:用1,2,3,4组成多少个不重复的3位数,分别是多少? 源代码: #include<stdio.h> int main() { int i,j,k,count=0; printf("\n"); for(i=1;i<5;i++) for(j=1;j<5;j++) { if(i!=k&&i!=j&
阅读全文
posted @ 2023-05-21 23:19 皮卡丘和杰尼龟
阅读(9)
评论(0)
推荐(0)
2023年5月20日
第28天打卡
摘要: 问题: 源代码: #include<stdio.h> #include<math.h> int main() { int a,b,c,count=0; for(a=1;a<=100;a++) { c=(int)sqrt(a*a+b*b); if(c*c==a*a+b*b&&a+b>c&&b+c>a&
阅读全文
posted @ 2023-05-20 23:20 皮卡丘和杰尼龟
阅读(16)
评论(0)
推荐(0)
2023年5月18日
第27天打卡
摘要: 问题: 算法设计: 首先要利用两个函数求出输入三位数能排列的最大数和最小数然后在求出其差值判断是否相等,若不相等则将继续循环上述步骤直至成立为止 源代码: #include<stdio.h>int maxf(int,int,int);int minf(int,int,int);int main(){
阅读全文
posted @ 2023-05-18 19:31 皮卡丘和杰尼龟
阅读(19)
评论(0)
推荐(0)
2023年5月17日
第26天打卡
摘要: 问题: 求13的13次方的最后三位数 源代码: #include<stdio.h> int main() { int i,x,y,last=1; scanf("%d %d",&x,&y); for(i=1;i<=y;i++) last=last*x%1000; peintf("%d",last);
阅读全文
posted @ 2023-05-17 23:30 皮卡丘和杰尼龟
阅读(20)
评论(0)
推荐(0)
2023年5月16日
第25天打卡
摘要: 问题: 源代码: #include<stdio.h> int main() { int i,t=0,k; int a[3]={0}; for(i=2;i<=1000;i++) { k=i; while(k) { a[t]=k%10; k=k/10; t++; } if(i==a[0]*a[0]*a[
阅读全文
posted @ 2023-05-16 18:43 皮卡丘和杰尼龟
阅读(17)
评论(0)
推荐(0)
2023年5月15日
第24天打卡
摘要: 问题: 输出所有的水仙花数 源代码: #include<stdio.h> int main() { int h,t,i,n; for(n=100;n<1000;n++) { h=n/100; t=(n-h*100)/10; i=n%10; if(n=h*h*h+t*t*t+i*i*i) printf
阅读全文
posted @ 2023-05-15 18:11 皮卡丘和杰尼龟
阅读(12)
评论(0)
推荐(0)
上一页
1
···
32
33
34
35
36
37
38
39
下一页
公告