zoukankan      html  css  js  c++  java
  • 个人所得税,学生成绩的代码

    import java.util.Scanner;
    class Demo{
        public static void main(String [] args){
            Scanner s=new  Scanner(System.in);
            System.out.println("请输入收入金额");
            double income=s.nextInt();
            double money;
            double tex=0;
            if (income<=3500)
            {
                money=income;
            }
            else if((income-3500)<=500)
            {
                tex =(income-3500)*0.05;
            }
            else if((income-3500)<=2000)
            {
                tex =(income-3500-500)*0.1+25;
            }
            else if((income-3500)<=5000)
            {
                tex =(income-3500-2000)*0.15+125;
            }
            else if((income-3500)<=20000)
            {
                tex =(income-3500-5000)*0.2+375;
            }
            else if((income-3500)<=40000)
            {
                tex =(income-20000-3500)*0.25+1375;
            }
            else if((income-3500)<=60000)
            {
                tex =(income-3500-40000)*0.3+3375;
            }
            else if((income-3500)<=80000)
            {
                tex =(income-3500-60000)*0.35+6375;
            }
            else if((income-3500)<=100000)
            {
                tex =(income-3500-80000)*0.4+10375;
            }
            else if((income-3500)>100000)
            {
                tex =(income-3500-100000)*0.45+15375;
            }
            money=income-tex;
            System.out.println("最后得到的工资为:"+money+"个人应缴纳的税为:"+tex);
        }
    }

    学生成绩

    import java.util.Scanner;
    class Demo
    {
        public static void main(String[] args){
            Scanner s=new Scanner(System.in);
            System.out.println("请输入一个学生的成绩");
            int score=s.nextInt();
            if(90<=score&&score<=100)
            {
                System.out.println("优秀");
            }
            else if(70<=score&&score<=80)
            {
                System.out.println("良好");
            }
            else if(60<=score&&score<=70)
            {
                System.out.println("及格");
            }
            else if(score<=60&&score>=0)
            {
                System.out.println("不及格");
            }
            else{
                System.out.println("输入错误");
                }
        }

  • 相关阅读:
    交叉编译工具链
    QNX Hypervisor管理程序
    DSP与CEVA芯片
    Runtime系统
    使用Xjar对jar文件进行加密,防止反编译
    有10个线程, 主线程怎么等待10个线程执行完之后才执行
    vue——使用echart后,字体模糊问题
    css——background属性设置background-size
    echart——宽度设置无效问题
    js——实现缩略图滑动,实际图对应滑动
  • 原文地址:https://www.cnblogs.com/wanghuaying/p/9296620.html
Copyright © 2011-2022 走看看