31 - Recursion

2018-01-01  本文已影响0人  社交帐号直接注册
#include <iostream>
using namespace std;
void bucky()
{
    cout << "qwert";
    bucky();
}
int main()
{
    bucky();
}
#include <iostream>
using namespace std;
int bucky(int x)
{
    if(x==1)
    {
        return 1;
    }
    else
    {
        return x*bucky(x-1);
    }
}
int main()
{
cout << bucky(5) << endl;
}
上一篇 下一篇

猜你喜欢

热点阅读