Tushar Goel wrote:salvin, we dont provide solutions... We let OP to find the solution..
Agree, the exponent will be int (Or perhaps long?) since both number and exponent are int.
Campbell Ritchie wrote:And why are you using the keyword float?
Vin Ash wrote:Writing a program but I can't use math power...
Vin Ash wrote:
The teacher told us it was simple and you can figure this out on your own
but so far what you guys are writing , it doesn't
Hang on. Shouldn't you create a method to calculate power? You crammed everything to one method "main". Remember, method name suppose to reveal its intention why is he for. I'd think create method with the technique shown earlier and name it puisPower or something. Not sure what this puis mean, btu anyway, give something meaningful.
Vin Ash wrote:Here is my finished code and it works