HW2.18

时间:2022-12-16 20:37:09

HW2.18

 public class Solution
 {
     public static void main(String[] args)
     {
         System.out.println("a" + "\t" + "b" + "\t" + "pow(a, b)");
         System.out.println(1 + "\t" + 2 + "\t" + (int)Math.pow(1, 2));
         System.out.println(2 + "\t" + 3 + "\t" + (int)Math.pow(2, 3));
         System.out.println(3 + "\t" + 4 + "\t" + (int)Math.pow(3, 4));
         System.out.println(4 + "\t" + 5 + "\t" + (int)Math.pow(4, 5));
         System.out.println(5 + "\t" + 6 + "\t" + (int)Math.pow(5, 6));
     }
 }

相关文章