[编程入门]最大公约数与最小公倍数 辗转相除法 摘要:解题思路:1.若b=0,不再循环,a为最大公约数2.计算a/b的余数,设t为余数,将b的值赋给a,t的值赋给b3.b不等于0,循环 (最大公约数)4.最小公倍数=a*b/最大公约数 (最小公倍数)注…… 题解列表 2023年01月07日 0 点赞 0 评论 496 浏览 评分:0.0
编写题解 1026: [编程入门]数字逆序输出 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main() { int a[10]; for(in…… 题解列表 2023年01月07日 0 点赞 0 评论 463 浏览 评分:0.0
编写题解 1024: [编程入门]矩阵对角线求和 适合新手理解体会 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main() { int k,p=0; int a[…… 题解列表 2023年01月07日 0 点赞 0 评论 465 浏览 评分:0.0
2754: 其他基本数据类型存储空间大小 题解 摘要:解题思路:遵照题意即可参考代码:#include<bits/stdc++.h>using namespace std;int main(){ bool a; char b; cout…… 题解列表 2023年01月07日 0 点赞 0 评论 678 浏览 评分:9.0
2753: 浮点型数据类型存储空间大小 题解 摘要:解题思路:遵照题意即可参考代码:#include<bits/stdc++.h> using namespace std; int main() { float a; doub…… 题解列表 2023年01月07日 0 点赞 0 评论 728 浏览 评分:9.9
甲流疫情死亡率 摘要:解题思路:注意事项:因为有百分号,所以应该给结果乘100参考代码:#include<stdio.h>int main(){ int a,b; double t; scanf("%d %d",&a,&b…… 题解列表 2023年01月07日 0 点赞 0 评论 1028 浏览 评分:8.0
c语言字符串拼接 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str1[101]={0}; char str2[50…… 题解列表 2023年01月07日 0 点赞 0 评论 736 浏览 评分:9.9
c语言解决字符串反转 摘要:解题思路:注意事项:字符串后面有一个'\0’所以要从j-1开始遍历,跳过\0参考代码:#include <stdio.h>#include <stdlib.h>#include <string…… 题解列表 2023年01月07日 0 点赞 0 评论 734 浏览 评分:0.0
C++代码(结构体的运用) ######解题思路:建立一个结构体,包含三个数据:学号,姓名,成绩。通过函数input进行数据的输入。通过函数print进行输出。```cpp#include#includeusingnamespacestd;structs{stringnum;//因为学号中包含英文,所以不能用int。 题解列表 2023年01月07日 0 点赞 0 评论 648 浏览 评分:9.9
编写题解 1022: [编程入门]筛选N以内的素数 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main() { int N; cin>>N; fo…… 题解列表 2023年01月07日 0 点赞 0 评论 357 浏览 评分:0.0