nextpow()
is an inbuilt function in julia which is used to return the smallest Syntax: nextpow(a, x) Parameters:Example:Returns: It returns the smallest
- a: Specified number greater than 1.
- x: Specified number greater than 0.
.
# Julia program to illustrate # the use of nextpow() method # Getting the smallest a ^ n println(nextpow( 2 , 8 ))
println(nextpow( 2 , 10 ))
println(nextpow( 3 , 8 ))
println(nextpow( 5 , 15 ))
|
8 16 9 25
prevpow()
Theprevpow()
is an inbuilt function in julia which is used to return the largest Syntax: prevpow(a, x) Parameters:Example:Returns: It returns the largest
- a: Specified number greater than 1.
- x: Specified number must not be less than 1.
.
# Julia program to illustrate # the use of prevpow() method # Getting the largest a ^ n println(prevpow( 2 , 8 ))
println(prevpow( 2 , 6 ))
println(prevpow( 3 , 8 ))
println(prevpow( 5 , 15 ))
|
8 4 3 5
Article Tags :
Recommended Articles