#include <stdio.h>

int main()
{
  
  int base, exp;
  
  int value=1;
  
  printf("Calculating a^b for b>=0:\n");
  
  printf("Enter the value of a:\n");
  scanf("%d", &base);
  
  printf("Enter the value of b:\n");
  scanf("%d", &exp);
  
  int orj_exp=exp;
  
  while (exp!=0)
  {
      value*=base;  // value = value*base; 
      --exp;
  }
   
 /* int i;
  
  for (i=1; i<=orj_exp; i++)
        value*=base;  
 
 */
  
  printf("%d ^ %d = %d", base, orj_exp, value);

return 0;
}

