Содержание
- 2. Текстовый файл
- 3. Форма для тестирования
- 4. public partial class Form1 : Form { struct vopros { public string vopr; public int kol;
- 5. Открытие файла public Form1() { InitializeComponent(); int n; if (File.Exists(@"test.txt")) readfl = new StreamReader(@"test.txt"); else {
- 6. Чтение из файла while (readfl.EndOfStream == false) { zap.vopr = readfl.ReadLine(); zap.kol = Convert.ToInt32(readfl.ReadLine()); n =
- 7. int max; summax = 0; for (int j = 0; j { max = 0; for
- 8. radio[0] = radioButton1; radio[1] = radioButton2; radio[2] = radioButton3; radio[3] = radioButton4; radio[4] = radioButton5; i
- 9. void vivod() { label1.Text = Test[i].vopr; for (int a = 0; a { radio[a].Checked = false;
- 10. private void button1_Click(object sender, EventArgs e) { for (int a = 0; a if (radio[a].Checked) sum
- 11. private void button2_Click(object sender, EventArgs e) { double rez; rez=(double)sum/summax*100; MessageBox.Show("Вы получили "+ Convert.ToString(rez)+"%"); this.Close(); }
- 14. Скачать презентацию