Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- double getA(int x,int y);
- main()
- {
- int a,b;
- int x;
- scanf("%d",&a);
- scanf("%d",&b);
- x = getA(a,b);
- printf("result main = %d\n",x);
- return 0;
- }
- double getA(int x,int y)
- {
- int i;
- int result=x;
- for(i=1;i<y;i++){
- result=result*x;
- //x*=x;
- }
- printf("result = %d\n",x);
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement