Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Power function
- #include<stdio.h>
- #include<math.h>
- int main(){
- double base,expo,power;
- printf("Enter base:\n");
- scanf("%lf",&base);
- printf("Enter exponent:\n");
- scanf("%lf",&expo);
- power=pow(base,expo);
- printf("%.2lf^%.2lf=%.2f",base,expo,power);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement