Power Function without using any loop in C | a power of b program in C

Spread the love
  1. /********** a power b program in C ***************/
  2. #include<stdio.h>
  3. main()
  4. {
  5. int a,b,r;
  6. printf(“Enter two values :”);
  7. scanf(“%d%d”,&a,&b);
  8. r=a;
  9. Label: if(b>1)
  10. {
  11. r=r*a;
  12. b–;
  13. goto Label;
  14. }
  15. printf(“%dn,r);
  16. }

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply