编写题解 2930: 派 摘要:解题思路:注意事项:找了好久的原因,才知道应该这样来算pi(1)double pai=acos(-1.0);(2)double eps=1e-5;参考代码:#include<stdio.h>#incl…… 题解列表 2022年11月11日 0 点赞 0 评论 444 浏览 评分:9.9
一种超简单的方法 摘要:解题思路: 利用数组将55以内全部计算出注意事项: 参考代码:#include<stdio.h>int fun(int n){ int a[…… 题解列表 2022年11月11日 0 点赞 0 评论 298 浏览 评分:9.9
10行代码完成--通俗易懂 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ // 2020为庚子,根据2020重新排序天干地支,使a[…… 题解列表 2022年11月11日 0 点赞 0 评论 408 浏览 评分:9.9
收集瓶盖赢大奖 摘要:解题思路:就是简单的判断注意事项:参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d%d",&a,&b); if(a>=10||…… 题解列表 2022年11月11日 0 点赞 0 评论 865 浏览 评分:9.9
判断一个数能否被3和5同时整除 摘要:解题思路:非常简单的一个代码注意事项:参考代码:#include<stdio.h>int main(){ int a; scanf("%d",&a); if(a%3==0&&a%5=…… 题解列表 2022年11月11日 0 点赞 1 评论 1136 浏览 评分:9.9
有一门科目不及格的学生 摘要:解题思路:注意事项:注意这里题目说的是只有一门不及格参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d%d",&a,&b); i…… 题解列表 2022年11月11日 0 点赞 0 评论 1278 浏览 评分:9.9
星期判断机 摘要:解题思路:简单的switch 可以解决注意事项:参考代码:#include<stdio.h>int main(){ int a; scanf("%d",&a); switch(a) …… 题解列表 2022年11月11日 0 点赞 0 评论 473 浏览 评分:9.9
不使用数组来实现更加注重基础 摘要:解题思路:我们可以使用一个for循环来判断输入的是几位数,然后可以用一个函数POW它的作用是pow(a,b) a的b次方求顺序输出;注意事项: 这个代码可以帮助您更好的理解循环,pow函数,以及数的…… 题解列表 2022年11月11日 0 点赞 0 评论 327 浏览 评分:9.9
自定义函数处理最大公约数与最小公倍数(没有定义函数,更容易理解) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int a, b, r, t; cin >> a >> b; t =…… 题解列表 2022年11月12日 0 点赞 0 评论 321 浏览 评分:9.9
自定义函数处理最大公约数与最小公倍数 (内含注释和解题思路) 摘要:解题思路:注意事项:参考代码://解题思路令r为a/b所得余数 若 r= 0,算法结束;b 即为答案。互换:置 a←b,b←r,并返回第一步。#include <iostream>using name…… 题解列表 2022年11月12日 0 点赞 0 评论 376 浏览 评分:9.9