fork download
  1. using System;
  2.  
  3. public class Example
  4. {
  5. public static void Main()
  6. {
  7. int value = 3;
  8. for (int power = 0; power <= 32; power++)
  9. Console.WriteLine("{1}^{1} = {2:N0}",
  10. value, power, (long)Math.Pow(value, power));
  11. }
  12. }
Success #stdin #stdout 0.04s 37016KB
stdin
Standard input is empty
stdout
0^0 = 1
1^1 = 3
2^2 = 9
3^3 = 27
4^4 = 81
5^5 = 243
6^6 = 729
7^7 = 2,187
8^8 = 6,561
9^9 = 19,683
10^10 = 59,049
11^11 = 177,147
12^12 = 531,441
13^13 = 1,594,323
14^14 = 4,782,969
15^15 = 14,348,907
16^16 = 43,046,721
17^17 = 129,140,163
18^18 = 387,420,489
19^19 = 1,162,261,467
20^20 = 3,486,784,401
21^21 = 10,460,353,203
22^22 = 31,381,059,609
23^23 = 94,143,178,827
24^24 = 282,429,536,481
25^25 = 847,288,609,443
26^26 = 2,541,865,828,329
27^27 = 7,625,597,484,987
28^28 = 22,876,792,454,961
29^29 = 68,630,377,364,883
30^30 = 205,891,132,094,649
31^31 = 617,673,396,283,947
32^32 = 1,853,020,188,851,841