Math.pow() Method Not Operating Correctly? - Programming & Development - Spiceworks Community
Math.pow
Can someone help me with (long)Math.Pow(number, power)?
Can somebody please help me with Math.pow and specifically raising to the power of.
Videos
Hi, I’m new to programming, I am taking a class in c# programming and was trying to write my program but I can’t figure out the math.pow function. The program is supposed to calculate compound interest but I can’t figure out how to use math.pow can someone help me figure it out?
For a homework assignment, we had to show multiples of 2 showing 21, 22, etc. Our book didn't even touch on this (of course), but after some research I found (long)Math.Pow(number, power). After some more research I got it to work. We had to have it loop 40 times and everything is correct, but I don't really know what the (long) is. It's with int and it looks like Math.Pow usually works with double but I didn't use double. Is this converting my int to something called long? I've been googling, but I'm not really coming up with any concrete answers.