Advertisement
kuruku

PrintNumbers

Apr 14th, 2014
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2.  
  3. //Write a program that prints at the console the numbers from 1 to 1000, each at a separate line. You might need to learn how to use
  4. //loops (search in Internet). Set a breakpoint in the line, which prints the next number in the Visual Studio code editor. Run the
  5. //program through the debugger using the [F5] key. When the debugger stops at the breakpoint trace the code execution with [F10] key.
  6.  
  7. class PrintNumbers
  8. {
  9.     static void Main()
  10.     {
  11.         for (int i = 1; i < 1001; i++)
  12.         {
  13.             Console.WriteLine(i);
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement