摘要:
抓交通肇事犯 问题:一个四位车牌号,甲说前两位相同,乙说后两位相同,丙说四位的车号正好是一个整数的平方,求车牌号? 流程图: 伪代码: 源代码: #include<iostream>using namespace std;int main(){ int P,i,j,k,L; for(i=0;i<9; 阅读全文
posted @ 2023-04-14 10:20
夏季彼岸德
阅读(33)
评论(0)
推荐(0)
摘要:
问题:打鱼还是晒网 某人从1990.1.1那天开始三天打鱼两天晒网,问将来某一天,他是在打鱼还是在晒网? 流程图: 伪代码: 源代码: #include<iostream>using namespace std;int const monthDay1[12]={31,28,31,30,31,30,3 阅读全文
posted @ 2023-04-14 10:16
夏季彼岸德
阅读(43)
评论(0)
推荐(0)
摘要:
第二题,借书方案: A,B,C三个小朋友在五本不同的书中借取其中一本,问有多少种借书方案? 流程图: 伪代码: 源代码: #include<iostream>using namespace std;int main(){ int a,b,c,i=0; for(a=1;a<6;a++){ for(b= 阅读全文
posted @ 2023-04-14 10:12
夏季彼岸德
阅读(24)
评论(0)
推荐(0)
摘要:
第一题,百钱百鸡 问题:一只公鸡值五钱,一只母鸡值三钱,三只小鸡值一钱,现用百钱买鸡,问公鸡母鸡和小鸡各有几只? 流程图: 伪代码: 源代码: #include<iostream>using namespace std; int main() { int cook,hen,chicken; for( 阅读全文
posted @ 2023-04-14 10:07
夏季彼岸德
阅读(23)
评论(0)
推荐(0)

浙公网安备 33010602011771号