SHARE
TWEET

REKURSIF (2)

della_manda Nov 18th, 2019 87 in 10 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int a,b,i;
  7.     printf("Masukkan angka: \n");
  8.     scanf("%d",&a);
  9.     printf("Akan dipangkatkan: \n");
  10.     scanf("%d",&b);
  11.  
  12.     for (i=2;i<=b;i++)
  13.     {
  14.         a=a;
  15.         a=a*a;
  16.     }
  17.     printf("Hasilnya adalah %d",a);
  18.  
  19.     return 0;
  20. }
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