#includeusing namespace std;//-----------------------class Hailstone{int n;public:Hailstone(int number){n=number;};void print(){while(n!=1){if (n%2==0){n=n/2;}else {n=n*3+1;}cout

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/20 21:45:35
#includeusing namespace std;//-----------------------class Hailstone{int n;public:Hailstone(int number){n=number;};void print(){while(n!=1){if (n%2==0){n=n/2;}else {n=n*3+1;}cout
x)SK)MI--KWKM-.HLNU(.Is<3sKR3J Jr2`ܤ"<[˺ֺ,?3E(Y]hkYjdkkVod]ShkZ&痖$Ý `s;X BfBfX3$ŷ`q4/C ~͐g>ٱɎg3?lF߳jAs }/.za]m@ O'LٚOsh}tDj _.{`ϋ3Xlg-Ov'zg

#includeusing namespace std;//-----------------------class Hailstone{int n;public:Hailstone(int number){n=number;};void print(){while(n!=1){if (n%2==0){n=n/2;}else {n=n*3+1;}cout
#include
using namespace std;
//-----------------------
class Hailstone{
int n;
public:
Hailstone(int number){n=number;};
void print()
{
while(n!=1)
{
if (n%2==0){n=n/2;}
else {n=n*3+1;}
cout

#includeusing namespace std;//-----------------------class Hailstone{int n;public:Hailstone(int number){n=number;};void print(){while(n!=1){if (n%2==0){n=n/2;}else {n=n*3+1;}cout
这个不是很明显的class Hailstone 后面少了个}吗
下次好好看清楚
代码风格还是要注意啊