Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int []chisla = new int[10];
- Random rand = new Random();
- for (int i = 0; i < chisla.Length; i++)
- {
- chisla[i] = rand.Next(-10, 10);
- }
- label1.Text = "";
- foreach (int chislo in chisla)
- {
- label1.Text += chislo.ToString();
- }
- Array.Sort( chisla );
- label1.Text = "\n";
- foreach (int chislo in chisla)
- {
- label1.Text += chislo.ToString();
- }
- int k= 0, no=0;
- DialogResult answer;
- do { k++;
- answer=MessageBox.Show("iskash li da Prodaljish?", "Da/Ne?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
- if (answer == DialogResult.Yes) { label1.Text = " kraj \n"; }
- else
- { no++; label1.Text = " otgowor no \n"; }
- }
- while (answer != DialogResult.Yes);
- label1.Text = label1.Text+"otgoworihte s 'no' "+ no +" pati" ;
- }
Advertisement
Add Comment
Please, Sign In to add comment