티스토리 뷰
// 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);
}
}
}
}
// 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 |
댓글