Facebook
From Abrupt Duck, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 153
  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 WindowsFormsApp21
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             int polski = int.Parse(t1.Text);
  23.             int matematyka = int.Parse(t2.Text);
  24.             int fizyka = int.Parse(t3.Text);
  25.  
  26.             double wynik = ((polski + matematyka + fizyka) / 3);
  27.             if (wynik >= 4.75)
  28.             {
  29.                 MessageBox.Show("Masz czerwony pasek ");
  30.             }
  31.             else
  32.             {
  33.                 MessageBox.Show("Nie Masz czerwonego paska  ");
  34.             }
  35.  
  36.         }
  37.     }
  38. }