java编程题目财务应用程序计算利息的答案
package nameyu;import java.util.Scanner;public class Test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner input=new Scanner(System.in); System.out.println("Enter balance and interest rate(e.g.,3 for 3%):"); double money=input.nextDouble(); double rate=input.nextDouble(); double interest=money*(rate/1200); System.out.println("The interest is "+(int)(interest*100000)/100000.0); } }
页:
[1]