返回列表 發帖
  1. import java.util.Scanner;
  2. public class Ch01 {
  3.         public static void main(String[] args) {
  4.             int d=3,c=5;
  5.             String str1="dog",str2="cat";
  6.             double total=21.3568;
  7.             System.out.printf("There are %d %ss and %d %Ss totally weigh %.2f pounds.",d,str1,c,str2,total);
  8.         }
  9. }
複製代碼

TOP

返回列表