SHARE
TWEET

Untitled

a guest Oct 18th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int n,i;
  5.     unsigned long long factorial = 1;
  6.     printf("Masukkan bilangan");
  7.     scanf("%d",&n);
  8.     if (n < 0){
  9.         printf("Tidak boleh bilangan negatif");
  10.     }
  11.     else
  12.     {
  13.         for(i=1;i<=n;++i){
  14.             factorial *= i;
  15.         }
  16.         printf("Faktorial dari %d adalah = %llu",n,factorial);
  17.     }
  18.     return 0;
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top