摘要: 求一个真分数的埃及分数表示 埃及分数是指只使用1作为分子的分数,例如8/11=1/2+1/5+1/55+1/110; 流程图: 伪代码: 源代码: #include<iostream>using namespace std;int main(){ int a,b,c,i,j; cout<<"请输入一 阅读全文
posted @ 2023-05-18 20:15 夏季彼岸德 阅读(44) 评论(0) 推荐(0)
摘要: 歌星大赛,十个评委打分,去掉一个最高分,去掉一个最低分,求剩下的八个评分的平均分,作为选手的最终分数 流程图:伪代码: 源代码: #include<iostream>using namespace std;int main(){ int a[10],b[8]; int i,j,k,t,sum=0,A 阅读全文
posted @ 2023-05-17 19:47 夏季彼岸德 阅读(34) 评论(0) 推荐(0)
摘要: 求两个正整数的最小公倍数 流程图:伪代码:源代码: #include<iostream>using namespace std;int main(){ int a,b,t,i,num; cout<<"请输入两个整数"<<endl; cin>>a;cin>>b; if(a<b){ t=a; a=b; 阅读全文
posted @ 2023-05-17 18:04 夏季彼岸德 阅读(39) 评论(0) 推荐(0)
摘要: 求两个整数的最大公因数 流程图:伪代码: 源代码: #include<iostream>using namespace std;int main(){ int x,y,i,k; cout<<"请输入两个整数"<<endl; cin>>x; cin>>y; if(x<y){ int t; t=x; x 阅读全文
posted @ 2023-05-16 16:35 夏季彼岸德 阅读(20) 评论(0) 推荐(0)
摘要: 不重复的三位数 用1 2 3 4这四个数组成不重复的三位数,每个数位的数也不同,问都有谁 流程图:伪代码:源代码: #include<iostream>using namespace std;int main(){ int a,b,c,d; for(a=1;a<=4;a++){ for(b=1;b< 阅读全文
posted @ 2023-05-16 16:22 夏季彼岸德 阅读(16) 评论(0) 推荐(0)
摘要: 求一百以内的勾股数 流程图: 伪代码: 源代码: #include<iostream>using namespace std;int main(){ int a,b,c,i,j,k; for(a=1;a<=100;a++){ for(b=a+1;b<=100;b++){ for(c=b+1;c<=1 阅读全文
posted @ 2023-05-15 19:21 夏季彼岸德 阅读(39) 评论(0) 推荐(0)
摘要: 黑洞数 流程图:伪代码: 源代码: #include<iostream>using namespace std; int maxof3(int,int,int); int minof3(int,int,int); int main(){ int i,k; int hun,oct,data,max,m 阅读全文
posted @ 2023-05-14 22:09 夏季彼岸德 阅读(18) 评论(0) 推荐(0)
摘要: 求x的y次方的最后三位数 流程图: 伪代码: 源代码: #include<iostream>using namespace std;int main(){ int num,y,x,i; printf("输入x以及x的次数y\n"); scanf("%d %d",&x,&y); for(i=1,num 阅读全文
posted @ 2023-05-14 19:51 夏季彼岸德 阅读(26) 评论(0) 推荐(0)
摘要: 水仙花数:一个三位数,每个位上的数的三次方的和等于这个数本身,那么他就是水仙花数 流程图: 伪代码: 源代码: #include<iostream>using namespace std;int main(){ int bai,shi,ge,i,j=0; for(i=100;i<1000;i++){ 阅读全文
posted @ 2023-05-12 18:01 夏季彼岸德 阅读(18) 评论(0) 推荐(0)
摘要: 回文数 流程图: 伪代码:源代码: #include<stdio.h>int main (){ int m[16],n,i,t,count=0; long unsigned a,k; printf("No. number it's square(palindrome)\n"); for(n=1;n< 阅读全文
posted @ 2023-05-11 21:05 夏季彼岸德 阅读(20) 评论(0) 推荐(0)