Home > Back-end >  How change to the data while coming? What reason be?
How change to the data while coming? What reason be?

Time:09-28

 # include  
# include
Using namespace STD.

Int main () {
Int * 'arry;
Int x=0;
'arry=(int *) malloc (x * sizeof (int));
Bool f=1;
While (f!=0) {
Int b, count=0;
The scanf (" % d ", & b);
Int a=b;
If (b!=0) {
While (a!=1) {
If (a % 2==0)
A=a/2;
The else
A=(a * 3 + 1)/2;
count++;
'arry [x]=count;
Printf (" % d \ n ", 'arry [x]).
}
X++;
}
The else
F=0;
}
for(int i=0; I {
Printf (" % d \ n ", 'arry [x]).
}
return 0;
}
  • Related