daily pastebin goal
34%
SHARE
TWEET

DoWhile

AalborgHTX Jan 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 WindowsFormsApplication27
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         int tal = 1;
  21.  
  22.         private void btnKnap_Click(object sender, EventArgs e)
  23.         {
  24.             do
  25.             {
  26.                 lstUd.Items.Add(tal);
  27.                 tal = tal + 1;
  28.             } while (tal < 10);
  29.  
  30.             while (tal >= 1)
  31.             {
  32.                 lstUd.Items.Add(tal);
  33.                 tal = tal - 1;
  34.             }
  35.         }
  36.     }
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top