Hi everyone !! my prof gave us an advance study for our nxt lesson in turbo , he said we need to create a code for this sample output. Base = 3

Exponent = 2answer is 9

Looks like a homework question.

My advice would be to look in your textbook and find how to do this and write the code yourself. That is how you learn.Nobody on this forum is going to do your homework questions for you.

If you can use the pow function, then use it. #include <math.h> or #include <cmath> double pow(double base, double exp);If you can't use the function then write your own using the pow function above as a reference. Hint: initialize a variable to 1 and then multiply it by the base for exp number of times.

In fact, it would probably be a good idea to use the pow function to verify that your function is returning the right answer.

HTH

hai can u help me please .. whats is the code of base and exponent using c language .. im not good in programs kasi .. hope u help me .. thanks and good bless !

Ask Your Question

Weekly Poll

Do you think Google should sell budget phones in the US?

Discuss in The Lounge

Poll History