Tuesday, March 5, 2024

42. Program of a^b :—

 


42. Program of a^b :—


#include<stdio.h>

int main()

{

    int a,b,f,i;

    printf("enter a value and a power ");

    scanf("%d%d",&a,&b);

    f=1;

    for(i=1;i<=b;i++)

    {

        f=f*a;

    }

    printf("%d",f);

    return 0;

}


No comments:

Post a Comment