Advertisement
Guest User

Pangkat Rekursif

a guest
Nov 21st, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void)
  5. {
  6.     int a,x,y,total=1;
  7.  
  8.     scanf("%i", &x);
  9.     scanf("%i", &y);
  10.  
  11.     for(a=1;a<=y;a++){
  12.         total=total*x;
  13.     }
  14.     printf("%d", total);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement