Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (lgbasallote):

can someone check my dev c++ code for exponent?

OpenStudy (lgbasallote):

#include <stdio.h> #include <conio.h> main () { int a, b, c, d; printf("Enter base number: "); scanf("%d", &a); printf("Enter exponent: "); scanf("%d", &b); d=1; c=a; start: if (b>d) { c = c*a; d = d+1; goto start; } printf("%d raised to %d = %d" , a,b,c); getch(); }

OpenStudy (lgbasallote):

nevermind..i got it :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!