标签:题目 out main public exe int oid print color
1 /** 2 * @author 冰樱梦 3 * 时间:2018年下半年 4 * 题目:千克与磅之间的转换 5 * 6 */ 7 public class Exercise05_05 { 8 public static void main(String[] args){ 9 System.out.printf("%-27s %-25s %-27s %-10s\n","千克","磅","磅","千克"); 10 int i=1,j=20; 11 // while(i<200 && j<=515){ 12 // System.out.printf("%-10d %-8.1f %-10d %-10.2f\n", i,2.2*i,j,j/2.2); 13 // i+=2; 14 // j+=5; 15 // } 16 do{ 17 System.out.printf("%-10d %-8.1f %-10d %-10.2f\n", i,2.2*i,j,j/2.2); 18 i+=2; 19 j+=5; 20 }while(i<200 && j<=515); 21 } 22 }
标签:题目 out main public exe int oid print color
原文地址:https://www.cnblogs.com/cherrydream/p/10173621.html