Results for: h-ans-a-ndersen-brendekilde

C program for a to the power b?

#include <stdio.h> int main() { int a, b,i,ans; printf("Enter a and b\t"); scanf("%d %d",&a,&b); ans=1; for(i=0;i<b;i++) ans=ans*a; printf("%d to the power %d = %d",a,b,ans); return 0; }