年薪计算器
package com.company;
import java.util.Scanner;
public class text {
public static void main(String[] args) {
while (true) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入您的月薪:");
int monthIn = scanner.nextInt();
System.out.println("请输入您工作的月数:");
int months = scanner.nextInt();
long yearIn = monthIn * months;
System.out.println("您的年薪为:" + yearIn);
if (yearIn > 200000) {
System.out.println("恭喜你超越98%的国人");
} else if(yearIn > 100000) {
System.out.println("恭喜你超越90%的国人");
} else {
System.out.println("你还需继续努力");
}
scanner.nextLine();
System.out.println("COMMOND: (next, exit)");
String commondL = scanner.nextLine();
if (commondL.equals("exit")) {
System.out.println("期待您的下次使用!");
break;
}
System.out.println("---------------");
}
}}
感谢您花时间阅读此篇文章,如果您觉得看了这篇文章之后心情还比较高兴,可以打赏一下,请博主喝上一杯咖啡,让博主继续码字……
本文版权归作者和博客园共有,来源网址:https://blog.csdn.net/weixin_46498102 欢迎各位转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接