Advertisement
Guest User

csepregi1

a guest
Oct 22nd, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace cikluscucc
  7. {
  8.     class forics
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Console.WriteLine("Hányszor fusson le a ciklus?");
  13.             int i, cv=0;
  14.             i = int.Parse(Console.ReadLine());
  15.             while (cv!=i)
  16.             {
  17.                 Console.WriteLine(cv+1);
  18.                 cv++;
  19.             }
  20.             Console.ReadKey();
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement