fork download
  1. using System;
  2.  
  3. public class Example
  4. {
  5. public static void Main()
  6. {
  7. int value = 20;
  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.03s 37864KB
stdin
Standard input is empty
stdout
20^0 = 1
20^1 = 20
20^2 = 400
20^3 = 8,000
20^4 = 160,000
20^5 = 3,200,000
20^6 = 64,000,000
20^7 = 1,280,000,000
20^8 = 25,600,000,000
20^9 = 512,000,000,000
20^10 = 10,240,000,000,000
20^11 = 204,800,000,000,000
20^12 = 4,096,000,000,000,000
20^13 = 81,920,000,000,000,000
20^14 = 1,638,400,000,000,000,000
20^15 = -9,223,372,036,854,775,808
20^16 = -9,223,372,036,854,775,808
20^17 = -9,223,372,036,854,775,808
20^18 = -9,223,372,036,854,775,808
20^19 = -9,223,372,036,854,775,808
20^20 = -9,223,372,036,854,775,808
20^21 = -9,223,372,036,854,775,808
20^22 = -9,223,372,036,854,775,808
20^23 = -9,223,372,036,854,775,808
20^24 = -9,223,372,036,854,775,808
20^25 = -9,223,372,036,854,775,808
20^26 = -9,223,372,036,854,775,808
20^27 = -9,223,372,036,854,775,808
20^28 = -9,223,372,036,854,775,808
20^29 = -9,223,372,036,854,775,808
20^30 = -9,223,372,036,854,775,808
20^31 = -9,223,372,036,854,775,808
20^32 = -9,223,372,036,854,775,808