Advertisement
Kenkaster001

HOA4

Aug 21st, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace HOA4
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void Form1_Load(object sender, EventArgs e)
  21. {
  22.  
  23. }
  24.  
  25. private void TextBox1_TextChanged(object sender, EventArgs e)
  26. {
  27.  
  28. }
  29.  
  30. private void Button1_Click(object sender, EventArgs e)
  31. {
  32. double weight, height, bmi;
  33. weight = int.Parse(textBox1.Text);
  34. height = int.Parse(textBox4.Text);
  35.  
  36. bmi = (weight * 0.45) / ((height * 0.025) * (height * 0.025));
  37. label8.Text = ("BMI: " + bmi);
  38. }
  39.  
  40. private void Label8_Click(object sender, EventArgs e)
  41. {
  42.  
  43.  
  44. }
  45.  
  46. private void Button2_Click(object sender, EventArgs e)
  47. {
  48. double start, end, sum;
  49.  
  50. start = double.Parse(textBox3.Text);
  51. end = double.Parse(textBox2.Text);
  52. sum = end * ((start + end) / 2);
  53. label7.Text = ("Sum: " + sum);
  54. }
  55.  
  56. private void TextBox3_TextChanged(object sender, EventArgs e)
  57. {
  58.  
  59. }
  60.  
  61. private void Label7_Click(object sender, EventArgs e)
  62. {
  63.  
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement