Advertisement
ntamas

20131014 SZF: 1. program

Oct 14th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace primek
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             string a;
  13.             int b, i=1, c=0;
  14.             Console.Write("Sz?m: ");
  15.             a = Console.ReadLine();
  16.             b = Convert.ToInt32(a);
  17.             do
  18.             {
  19.                 if(i % b == 0)
  20.                 {
  21.                     Console.WriteLine(i);
  22.                     c++;
  23.                 }
  24.                 i++;
  25.             }while(c < 10);
  26.             Console.ReadKey();
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement