fork download
  1. using System;
  2.  
  3. public class Example
  4. {
  5. public static void Main()
  6. {
  7. int value = 4;
  8. for (int power = 0; power <= 32; power++)
  9. Console.WriteLine("{0}^{1} = {2:N0}",
  10. value, power, (long)Math.Pow(value, power));
  11. }
  12. }
Success #stdin #stdout 0.04s 38040KB
stdin
Standard input is empty
stdout
4^0 = 1
4^1 = 4
4^2 = 16
4^3 = 64
4^4 = 256
4^5 = 1,024
4^6 = 4,096
4^7 = 16,384
4^8 = 65,536
4^9 = 262,144
4^10 = 1,048,576
4^11 = 4,194,304
4^12 = 16,777,216
4^13 = 67,108,864
4^14 = 268,435,456
4^15 = 1,073,741,824
4^16 = 4,294,967,296
4^17 = 17,179,869,184
4^18 = 68,719,476,736
4^19 = 274,877,906,944
4^20 = 1,099,511,627,776
4^21 = 4,398,046,511,104
4^22 = 17,592,186,044,416
4^23 = 70,368,744,177,664
4^24 = 281,474,976,710,656
4^25 = 1,125,899,906,842,624
4^26 = 4,503,599,627,370,496
4^27 = 18,014,398,509,481,984
4^28 = 72,057,594,037,927,936
4^29 = 288,230,376,151,711,744
4^30 = 1,152,921,504,606,846,976
4^31 = 4,611,686,018,427,387,904
4^32 = -9,223,372,036,854,775,808