16 lines
208 B
C
16 lines
208 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main() {
|
||
|
long x = 76;
|
||
|
|
||
|
while(x != 1) {
|
||
|
if(x % 2 == 0) {
|
||
|
x /= 2;
|
||
|
}
|
||
|
else {x = (x * 3) + 1;}
|
||
|
printf("%ld\n", x);
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|