Using ulong with Math.Pow

255 Views Asked by At

I have the following code:

ulong num = ulong.Parse(Console.ReadLine());
ulong num1 = Math.Pow(num, 2);

This gives me the following error:

Error CS0266 Cannot implicitly convert type 'double' to 'ulong'. An explicit conversion exists (are you missing a cast?)

What am I doing wrong?

0

There are 0 best solutions below