Advertisement
Venciity

[ Telerik C#] LOOPS - EX 1

Feb 9th, 2014
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. //Write a program that prints all the numbers from 1 to N.
  2.  
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8.  
  9. namespace ex1
  10. {
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             Console.WriteLine("number = ");
  16.             int number = Int32.Parse(Console.ReadLine());
  17.             for (int i = 1; i <= number; i++)
  18.             {
  19.                 Console.WriteLine("{0}",i);
  20.             }
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement