标签:新手练习
import java.util.Scanner;/**
/
Bank,java
public class Bank {
public static void main(String[] args){
Scanner input=new Scanner(System.in);
double money,yi,er,san,wu;
System.out.println("请输入本金:");
money=input.nextDouble();
System.out.println("本金为:");
yi=money*1.0225;
er=money*(1+0.027*2);
san=money*(1+0.0324*3);
wu=money*(1+0.036*5);
System.out.println("");
System.out.println("存取一年后的本息是:"+yi);
System.out.println("");
System.out.println("存取二年后的本息是:"+er);
System.out.println("");
System.out.println("存取三年后的本息是:"+san);
System.out.println("");
System.out.println("存取五年后的本息是:"+wu);
}
}
标签:新手练习
原文地址:http://blog.51cto.com/13704315/2105130