Powered By Blogger

Feb 11, 2025

15. Calculate Power of a Number

 #include <stdio.h>

#include <math.h>

int main() {

    double base, exponent, result;

    printf("Enter base and exponent: ");

    scanf("%lf %lf", &base, &exponent);

    result = pow(base, exponent);

    printf("Result: %.2lf\n", result);

    return 0;

}


No comments:

Post a Comment

Featured Post

Data Analysis

    What is data analysis and its significance?   Data analysis is the process of collecting, transforming, and organizing data to dr...

Popular Posts