#include <iostream>
using namespace std;
void long_fctrl(int num[], int f_num) // Function for Factorial
{
--f_num; // Decrement Number to multiply with Factorial Number.
int i = 0,
我一直在試圖解決java.lang中的3n + 1問題,但是我的輸出似乎是非常隨機的。問題是 考慮以下算法: 1. input n
2. print n
3. if n = 1 then STOP
4. if n is odd then tex2html_wrap_inline44
5. else tex2html_wrap_inline46