Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1. //easy question
  2.             int[] points = new int[questions.Length / 2];
  3.             int k = 0;
  4.             for (int i = 1; i < questions.Length; i += 2)
  5.             {
  6.                 string[] tmp = questions[i].Split(':');
  7.                 points[k] = Convert.ToInt32(tmp[0]);
  8.                 k++;
  9.             }
  10.             int minq = 100;
  11.             for (int i = 0; i < points.Length; i++)
  12.             {
  13.                 if (points[i] < minq)
  14.                 {
  15.                     minq = points[i];
  16.                 }
  17.             }
  18.             string minq_str = minq.ToString();
  19.             int numq = 1;
  20.             for (int i = 1; i < questions.Length; i += 2)
  21.             {
  22.                 string[] tmp = questions[i].Split(':');
  23.                 string asnq = tmp[1].Substring(tmp[1].IndexOf('('));
  24.                 asnq = asnq.Substring(1, asnq.Length - 2);
  25.                 if (tmp[0] == minq_str)
  26.                 {
  27.                     label9.Text = "№" + numq + ":" + asnq;
  28.                 }
  29.                 numq++;
  30.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement