1.2.3 赋值
package test;
import java.util.Scanner;
public class Test1java {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("test hello world again:你好,こんにちは");
int amount = 100;
int price = 0;
Scanner in = new Scanner(System.in);
System.out.print("请输入票面:");
amount = in.nextInt();
System.out.print("请输入价格:");
price = in.nextInt();
System.out.print("输出找零:");
System.out.println(amount+"-"+price+"="+(amount-price));
}
}
本文标题:1.2.3 赋值
本文链接:https://www.haomeiwen.com/subject/mnnssqtx.html
网友评论