循环实现x的y次方

     int x,y;
     x=1;
     for(y=0;y<3;y++) //10的3次方 
x=x*10;



      int x,y;
      x=1;
      for(y=0;y<6;y++) //2的6次方 
x=x*2;

你可能感兴趣的:(循环)