0

Make a program which tells the power of any number, for example 2 raise to power 50

31st Mar 2018, 8:01 PM
SHAHID SIKANDAR
SHAHID SIKANDAR - avatar
5 Respuestas
+ 8
dude this is JavaScript,and that is a simple function and if you had actually tested it it should work,coding is about reducing space not about writing tonnes of code on simple tasks
31st Mar 2018, 8:11 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 6
function pow(number,power) { return number**power } it's as easy as that
31st Mar 2018, 8:03 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 5
dislike my comments all you want Shahid,i still do not know the necessity of writing full programs on powers when a single function is needed to do this and power method even exists in the Math library
31st Mar 2018, 8:14 PM
᠌᠌Code X
᠌᠌Code X - avatar
0
no
31st Mar 2018, 8:04 PM
SHAHID SIKANDAR
SHAHID SIKANDAR - avatar
0
show out put it's wrong becong it becomes high range than your int of 8 byte does not support u should choose more byte data type write full program if you can
31st Mar 2018, 8:06 PM
SHAHID SIKANDAR
SHAHID SIKANDAR - avatar