<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    302班

    java突擊隊
    posts - 151, comments - 74, trackbacks - 0, articles - 14
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    if else語句實現稅率征收

    Posted on 2007-04-08 12:05 停留的風 閱讀(484) 評論(0)  編輯  收藏 所屬分類: Java程序集合


    import javax.swing.JOptionPane;
    public class taxQuestion
    {
      public static void main(String[] args)
      {
       //輸入基準值
       String statusString=JOptionPane.showInputDialog(null,"Enter the filing status:\n"+"(0-single filer,1-married jointly,\n)"+"2-married separately,3-head of household)","Input a status",JOptionPane.QUESTION_MESSAGE);
       int status=Integer.parseInt(statusString);
       //輸入收入値
       String incomeString=JOptionPane.showInputDialog(null,"Enter the taxable income:","Give me your money",JOptionPane.QUESTION_MESSAGE);
       Double income=Double.parseDouble(incomeString);
       double tax=0;
    if(status==0)
      {
       if(income<=1200)
        JOptionPane.showMessageDialog(null,"You should not pay for the tax!","The show of the result",JOptionPane.INFORMATION_MESSAGE);
       else if(income<=3000)
       {
        tax=(income-1200)*0.10;
       JOptionPane.showMessageDialog(null,"You should pay"+tax+"for the tax!","The show of the result",JOptionPane.INFORMATION_MESSAGE);
       }
       else if(income<=10000)
       {
        tax=(income-3000)*0.15;
        JOptionPane.showMessageDialog(null,"You should pay"+tax+"for the tax!","The show of the result",JOptionPane.INFORMATION_MESSAGE);
       }
       else if(income<300000)
       { 
         tax=(income-10000)*0.30;
         JOptionPane.showMessageDialog(null,"You should pay"+tax+"for the tax!","The show of the result",JOptionPane.INFORMATION_MESSAGE);
       }
       else
       {
         tax=(income-300000)*0.80;
         JOptionPane.showMessageDialog(null,"You should pay"+tax+"for the tax!","The show of the result",JOptionPane.INFORMATION_MESSAGE);
       }
      }
       else
       {
         tax=(income-status);
        JOptionPane.showMessageDialog(null,"You should pay"+tax+"for the tax!","The show of the result",JOptionPane.INFORMATION_MESSAGE);
       }
     }
    }
    /////////////////////////////////////////////////////////////////////////
    測試結果簡要如下:
    ////////////////////////////////////////////////////////////////////////




    主站蜘蛛池模板: 吃奶摸下高潮60分钟免费视频| 国产免费人视频在线观看免费| 1000部无遮挡拍拍拍免费视频观看 | 一级毛片免费全部播放| 中文字字幕在线高清免费电影| a在线观看免费网址大全| 日本XXX黄区免费看| 四虎永久免费观看| 老外毛片免费视频播放| 67194成手机免费观看| 久久亚洲私人国产精品| 亚洲欧美日韩中文字幕在线一区 | 黄色毛片免费在线观看| 亚洲精品无码久久毛片| 久久亚洲中文字幕精品有坂深雪| 在线免费中文字幕| 亚洲国产成人精品91久久久| 亚洲另类古典武侠| 99精品视频在线观看免费| 狼友av永久网站免费观看| 久久亚洲精品无码| 免费人成再在线观看网站| 毛片免费在线播放| 亚洲成a人片在线观看无码| 亚洲人成免费电影| 男女啪啪永久免费观看网站| 国产成人高清精品免费观看| 国产精品公开免费视频| 亚洲人成人77777网站不卡 | 亚洲精品乱码久久久久久蜜桃| 韩国免费A级毛片久久| 亚洲午夜成激人情在线影院 | 亚洲AV无码久久精品成人| 四虎国产精品永免费| 国产一卡二卡≡卡四卡免费乱码| 美女无遮挡拍拍拍免费视频| 日本中文一区二区三区亚洲| 亚洲欧洲AV无码专区| 国产亚洲av人片在线观看| 日韩免费在线中文字幕| 亚洲午夜久久久精品影院|