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

  2. public class Ch11 {
  3.         public static void main(String[] args) {
  4.                 String str1="dog",str2="cat";
  5.                 int a=3,b=5;
  6.                 double total = 21.3586;
  7.                 System.out.printf("There are %d %ss and %d %Ss totally weigh %.2f pounds."
  8.                                 ,a,str1,b,str2,total);
  9.         }

  10. }
複製代碼

TOP

返回列表