电费计算器
JAVA源码:
import java.util.Scanner;//引入Scanner类,负责从键盘接收数据
public class Power {double lastRecord;
double currentRecord;
double usedAmount;
double usedFee;
public void setRecord(){
Scanner scan=new Scanner(System.in);
System.out.print("请输入上月用电数:");
lastRecord=scan.nextInt();//读入一个字符串
发布评论