please correct them to make sure we can get the printed-out result as below:
3 10 5 16 8 4 2 1
...全文
156825打赏收藏
求助,诺基亚面试题
There are two errors in the following JAVA program: static void g(int i){ if(i==1){return;} if(i%2==0){g(i/2);return;} else {g(3*i);return;} } please correct them to make sure we can get the printed-out result as below: 3 10 5 16 8