Questions tagged [exponent]

Exponentiation is a mathematical operation, written as b raised to the power of n, involving two numbers, the base b and the exponent (or power) n.

Exponentiation refers to the mathematical operation involving two numbers, one is a base and another is an exponent. It is repeated multiplication. To calculate 53 you have to multiply the number 5 (base) by itself 3 times (exponent).

588 questions
-5
votes
1 answer

How are variables involved in a for loop's body if they are not defined?

Sorry there was a mistake earlier in this. This actually worked, but I'm confused where the value of result is involved in the for loop. import java.util.Scanner; public class PowerLoop { public static void main(String [] args) { …
eri
  • 5
  • 2
-5
votes
3 answers

Why does double.TryParse("6E02", out tempDouble) return true?

It took me a day to figure out the problem that one of the if statement returns true for a string value. We are parsing to check whether the value is a number or a string. I found out that this statement used and when the string value comes in as…
akd
  • 6,538
  • 16
  • 70
  • 112
-5
votes
1 answer

Write a function to compute a**n in C

Write a function to compute the power an, where n ≥ 0. It should have the following specification and prototype: Sets *p to the n’th power of a and returns 0, except when n < 0 or p is NULL, in which case it returns -1. int power(int a, int n, int…
1 2 3
39
40