Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 HOA4
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void TextBox1_TextChanged(object sender, EventArgs e)
- {
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- double weight, height, bmi;
- weight = int.Parse(textBox1.Text);
- height = int.Parse(textBox4.Text);
- bmi = (weight * 0.45) / ((height * 0.025) * (height * 0.025));
- label8.Text = ("BMI: " + bmi);
- }
- private void Label8_Click(object sender, EventArgs e)
- {
- }
- private void Button2_Click(object sender, EventArgs e)
- {
- double start, end, sum;
- start = double.Parse(textBox3.Text);
- end = double.Parse(textBox2.Text);
- sum = end * ((start + end) / 2);
- label7.Text = ("Sum: " + sum);
- }
- private void TextBox3_TextChanged(object sender, EventArgs e)
- {
- }
- private void Label7_Click(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement