54.0k views
2 votes
This is computer programming and it confuses me very much

This is computer programming and it confuses me very much-example-1

1 Answer

2 votes

Answer:

Using a loop or using the power function from a math library.

Step-by-step explanation:

Really the question needs a bit more context. But if you want to calculate
a^(b)

and b is a whole number, you could create a loop with b steps and keep multiplying by a.

Alternatively, you can use a power function such as pow(a,b) from math.h in the C programming language.

User Karthik Kumar
by
4.9k points