帮才菜鸟看看能实现么,,
import java.util.Scanner;public class TestThree {
public static void main(String []args)
{
System.out.print("************消费单**************");
System.out.print("\n购买物品\t单价\t个数\t金额");
System.out.print("\nT恤\t¥245\t");
Scanner input = new Scanner(System.in);
int shirtPrice = 245 ; //T恤单价
int geShu = input.nextInt();
int shirtMoney = (shirtPrice * geShu); //计算金额
System.out.print(+shirtMoney);
}
}
控制台输出的金额无法对应到 单价后面,,