返回列表 發帖
  1. import java.util.Scanner;

  2. public class Ch10
  3. {
  4.         public static void main(String args[])
  5.     {
  6.         String str1="dog",str2="cat";
  7.         int f=9,b=10;
  8.         double total=45.5543769;
  9.         System.out.printf("There are %d %ss and %d %Ss totally weigh %.2f "
  10.                                    +"pounds.",f,str1,b,str2,total);  
  11.     }
  12. }
複製代碼

TOP

返回列表