Advertisement
mjc65

loop

Apr 22nd, 2020
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.22 KB | None | 0 0
  1. int counter = 0;
  2.     for (int x=0; x<=10; x+=2)
  3.         {
  4.             counter++;
  5.             Console.WriteLine("Looping through the for loop  {0} times", counter);
  6.             Console.WriteLine("The value of x is: {0}", x);
  7.         }
  8.  
  9.         Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement