1147: C语言训练-角谷猜想 摘要:解题思路:首先获取输入的数值;使用scanf()函数;根据题目要求,需要在一个循环中依次输出针对该数值的运算过程;首先需要判断输入数是奇数或是偶数;通过if,else if判断进入不同的分支;使用m接…… 题解列表 2022年01月27日 0 点赞 0 评论 237 浏览 评分:0.0
顺便练习一下函数 摘要:#include<stdio.h> int fun(int n) { int ret; if ( n%2==0 ) { ret=n/2; printf("%d/2=%d\n…… 题解列表 2022年01月27日 0 点赞 0 评论 176 浏览 评分:9.9
Hifipsysta-1147题-C语言训练-角谷猜想(C++代码)普通递归法 摘要:```cpp #include using namespace std; int func(int n){ int result; if(n%2==0){ …… 题解列表 2022年01月31日 0 点赞 0 评论 207 浏览 评分:9.9
记录一蛤 T#T 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#include<string.h>#include<ctype.h>int even(int a){ …… 题解列表 2022年02月20日 0 点赞 0 评论 112 浏览 评分:0.0
编写题解 1147: C语言训练-角谷猜想 摘要:解题思路:按题意注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; while(n!…… 题解列表 2022年03月14日 0 点赞 0 评论 321 浏览 评分:9.9
角谷猜想 c++ 摘要:解题思路:先写偶数,再写奇数,中间用else(个人想法)注意事项:不要用break,是偶数/2,不是偶数*3+1参考代码:#include<bits/stdc++.h>using namespace …… 题解列表 2022年03月26日 0 点赞 0 评论 1072 浏览 评分:8.3
循环和if()语句 摘要:解题思路:注意事项:参考代码: #include<stdio.h> int main () { int x,n; scanf("%d",&x);   题解列表 2022年05月12日 0 点赞 0 评论 119 浏览 评分:0.0
角谷猜想(c语言) 摘要:解题思路:判断奇偶,再从循环里判断输出注意事项:不止要用printf输出表达式,还要实质上进行n的运算参考代码:#include<stdio.h>int main(){ int n; scanf(…… 题解列表 2022年06月30日 0 点赞 0 评论 292 浏览 评分:9.9
其实就是一个人简单的循环 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int n,a; cin>>n; for(int i=1;;i++) …… 题解列表 2022年07月17日 0 点赞 0 评论 109 浏览 评分:0.0
C语言训练-角谷猜想(C语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>#include <string.h>int main(){ //若为偶数除以2,若为奇数…… 题解列表 2022年08月15日 0 点赞 0 评论 360 浏览 评分:8.0