Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
Select your favorite languages :
  • Or search :

Idiom #305 Calculate exponentiation of real numbers

Calculate and print a^b, and a^n, where a and b are floating point numbers and n is an integer.

  print *,a**b, a**n
math
writeln('a^b=',power(a,b));
writeln('a^n=',power(a,n));
print(a ** b, a ** n)
puts a ** b, a ** n

New implementation...
< >
tkoenig