用while循环写计算3的5次方计算2的6次方计算12345*6
可以使用计数器,通过每一次while循环的执行-1
int n=5;//指数int a=3;//底数int b=1;while(n>0){b=b*a;n--;}System.out.println(b);