티스토리 뷰

AU Study/TAFE

w6 Fri morning

Last72 2017. 8. 29. 09:34
// Woongyeol_choi



// P453075



// 25/08/2017



// AT1.2_Q4



using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;



namespace Woongyeol_Choi_p453075_AT1._2_Q4

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }



        private void btnCalculate_Click(object sender, EventArgs e)

        {

            int income, tax;



            textTax.Text = "";



            if(!(Int32.TryParse(textIncome.Text, out income)))

            {

                MessageBox.Show("You must enter a number, please try again.");

                return;

            }



            if (income <= 18200)

            {

                textTax.Text = "Nill";

            }

            else if (income <=37000)

            {



                textTax.Text = "" + ((income - 18200) * 0.19);

            }

            else if (income <= 80000)

            {

                textTax.Text = ""  + (( income - 37000) * 0.325 + 3572);

            }

            else if (income <= 180000)

            {

                textTax.Text = "" + ((income - 80000) * 0.37 + 17547);

            }

            else

            {

                textTax.Text = "" + ((income - 180000) * 0.45 + 54547);

            }





        }

    }

}

'AU Study > TAFE' 카테고리의 다른 글

CSS table  (0) 2017.08.29
w6 Fri afternoon  (0) 2017.08.29
w6 wed afternoon  (0) 2017.08.29
w6 wed morning  (0) 2017.08.29
w6 Tue afternoon  (0) 2017.08.29
댓글
Announcement
Recent Posts
Recent Comments
Total
Today
Yesterday
Link
TAG
more
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Search by month