Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. using System;
  2.  
  3. namespace nejdelšího_symetrický_úsek
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("Nejdelší souvislý symetrický úseku");
  10.             Console.Write("Zadejte počet čísel, kolik chcete vypsat: ");
  11.             int pocet;
  12.             pocet = int.Parse(Console.ReadLine());
  13.             Random nahodnaCisla = new Random();
  14.             int[] vybranaCisla = new int[pocet];
  15.  
  16.             for (int i = 0; i < vybranaCisla.Length; i++)
  17.             {
  18.                 vybranaCisla[i] = nahodnaCisla.Next(1, 100);
  19.  
  20.            
  21.                
  22.             }
  23.             foreach (int cislo in vybranaCisla)
  24.             {
  25.                 Console.Write("{0} ", cislo);
  26.             }
  27.             Console.ReadKey(true);
  28.  
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement