System.out.printf("There are %d %ss and %d %Ss.",a,str1,b,str2);
}
}
複製代碼
作者: 龔品誠 時間: 2021-2-20 10:35
package owo;
public class owo {
public static void main(String[] args) {
String str1="dog", str2="cat";
int a=3, b=5;
System.out.printf("There are %d %ss and %d %Ss.",a,str1,b,str2);
}
}
複製代碼
作者: 李穎俊 時間: 2021-2-20 10:36
本帖最後由 李穎俊 於 2021-3-6 10:30 編輯
import java.util.Scanner;
public class JPA01 {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
System.out.print("Please input:");
float a=s.nextInt();
double b=2.20462;
System.out.printf("%f kg = %f ponds",a,a*2.20462);
}
}
複製代碼
作者: 李柏穎 時間: 2021-2-20 10:36
public class Ch01
{
public static void main(String[] args)
{
String str1="dog", str2="cat";
int a=3, b=5;
System.out.printf("There are %d %ss and %d %Ss.",a,str1,b,str2);
}
}
複製代碼
作者: 張淯祺 時間: 2021-2-20 10:37
[code][/code]package a01;
public class a01 {
public static void main(String[] args) {
String str1="dog", str2="cat";
int x=3, y=5;
System.out.printf("There are %d %ss and %d %Ss.",x,str1,y,str2);
}
}作者: 林羿丞 時間: 2021-2-20 10:37
[code]public class XD
{
public static void main(String[] args)
{
String str1="dog", str2="cat";
int a=3, b=5;
System.out.printf("There are %d %ss and %d %Ss.",a,str1,b,str2);
}
}
複製代碼
[/code]作者: 王銘鴻 時間: 2021-2-20 10:39
package a01;
public class a01 {
public static void main(String[] args)
{
String str1="dog", str2="cat";
int a=3, b=5;
System.out.printf("There are %d %ss and %d %Ss.",a,str1,b,str2);
}
}
複製代碼
作者: 黃柏智 時間: 2021-2-20 10:39
public class A02 {
public static void main(String[] args) {
String str1="dog";
String str2="cat";
int a=4,b=6;
System.out.printf("there are %d %Ss and %d %Ss",a,str1,b,str2);
}
}
複製代碼
作者: 陳莉榛 時間: 2021-2-20 10:39
package a01;
public class a01 {
public static void main(String[] args) {
String str1="dog",str2="cat";
int a =3, b=5;
System.out.printf("There are %d %ss and %d %Ss.",a,str1,b,str2);