猿问

20的阶乘怎么输出,数据类型及打印格式是什么,用的dev编辑器

20的阶乘怎么输出,数据类型及打印格式是什么,用的dev编辑器


#include <stdio.h>


int f(int n)

{   

    if(n == 1)

    {

        return 1;    

    }

    else{

        return f(n-1)*n ;       

    }

}

int main()

{

    int n;

    unsigned long long sum=0;

    scanf("%d",&n);

    sum=f(n);

    printf("%llu",sum);

    return 0;

}


jaylimey
浏览 1247回答 2
2回答

慕设计2395807

BXMQMJZHKHQYVXAUQOKTWTYULHRLHXAWMWTISOQIEGJGJZVRUEHRNKSWSUENWSPLBKDMVRNJSIXFUUQNPLBRTJMBNCSBXGWTVEAKZIXFORGIRNDMUYNJZOKADAPMILBDLUQAWNDGNDGJSIEXQPZFPFDJZJFCSPZOXBDMOGMFVSDNQXWJVOYONDTJGRBLEHYEPYFVLYLBBHDTIYEYHIXDDAAWCCSPMOEHDFVFUJZIFBRUDYPLVLFJRHWGCSUEOHQNWMCYOKGQSJEUPZWFCLAGPLIXGVLODNVFBJTCSVROQNATATJXHHGQTILUQUKNVSBPLNJADZWEHCTPXUQGWSOXUIYNXFCSBDNJYHLNDGPSOEBXTPMIRBRMWZFNKUCMCSBQAQSBRNYHKGCMHDMWZISOXADBSBLIETIDTDZPRAPSIMPZITILIDZPLBRNQNIKTVLVXAWNPLHKUJMZCFAIEUJZPMICLJRHDNQSPEHQMHWTWQMCETWORZUDTCZHKNJLGCFHKNCYHKFHXGCFUJFVMUELBQUWMVRFURMUDZCEGWHPLNXAJMTPYUQZCQMICEHCFBWSOKGWLBEPYTDFJFHQKADTCEUKTVLUDWSUDGILOKMPSUWZBKMDMOKCFOSOXAQZHDPLNQSOJSAKNFCETCLVRADSQMIRMJFPRNWAJSUDZJYABEZIYUOXNPROXIIXGWLAKFIKKACEHIXAWLBPSUKZPFBVRNNPXGWFHKGKZOENWZOCFOLHSAWZVSADNJRIRZJZIMCRBXQMPSVYUDMCSZCRADNXGCSOTCEHDGWMBRURACMIXAKMVLUEUKHXHXMCLGJDTWZIYAKGVFUXMQZXGCMIEHWUQZIRGCQAISVDAJSPYXMORUKMKTCF
随时随地看视频慕课网APP
我要回答