AalborgHTX

FOR løkke

Jan 18th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 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 For_lokke
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         int tal = 0;
  16.         public Form1()
  17.         {
  18.             InitializeComponent();
  19.         }
  20.  
  21.         private void btnKlikPaaMig_Click(object sender, EventArgs e)
  22.         {
  23.             for (int i = 0; i < 10; i++)
  24.             {
  25.                 tal = tal + i;
  26.                 lstUd.Items.Add("i = " + i + " "+ tal);
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment