Advertisement
memchik

test

Jun 21st, 2021
970
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 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 test
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.  
  21.         private void Button1_Click(object sender, EventArgs e)
  22.         {
  23.             int score = 0;
  24.  
  25.             if (radioButton3.Checked == true)
  26.             {
  27.                 score++;
  28.             }
  29.             if (radioButton6.Checked == true)
  30.             {
  31.                 score++;
  32.             }
  33.             if (radioButton8.Checked == true)
  34.             {
  35.                 score++;
  36.             }
  37.             if (maskedTextBox1.Text == "2.7")
  38.             {
  39.                 score++;
  40.             }
  41.             label5.Text = String.Format("Правильных ответов: {0}", score);
  42.         }
  43.  
  44.         private void label1_Click(object sender, EventArgs e)
  45.         {
  46.  
  47.         }
  48.     }
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement