İdeal Kilo Hesaplama C# Csharp
İdeal Kilo Hesaplama C# Csharp
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 WindowsFormsApplication4 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) { pictureBox1.Visible = false; pictureBox2.Visible = false; pictureBox3.Visible = false; pictureBox4.Visible = false; pictureBox5.Visible = false; double kilo, boy, vik; kilo = Convert.ToDouble(textBox1.Text); boy = Convert.ToDouble(textBox2.Text); vik = kilo / (boy * boy); if (vik <=18.5) { label4.Text = "ZAYIF"; pictureBox1.Visible = true; } if (vik > 18.5 && vik <= 24.9) { label4.Text = "İDEAL"; pictureBox2.Visible = true; } if (vik > 24.9 && vik <= 29.9) { label4.Text = "ŞİŞMAN"; pictureBox3.Visible = true; } if (vik > 29.9 && vik <= 34.9) { label4.Text = "OBEZ"; pictureBox4.Visible = true; } if (vik > 34.9) { label4.Text = "AŞIRI OBEZ"; pictureBox5.Visible = true; } } } }