kisame1313

Утр. занятие 29.07 №3

Jul 29th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. namespace IMJunior
  6. {
  7.     class Program
  8.     {
  9.         static void Main ( string [] args )
  10.         {
  11.            
  12.             List<int> list = new List<int> ();
  13.             Random random = new Random ();
  14.  
  15.             for ( int i = 0 ; i < 10 ; i++ )
  16.             {
  17.                 list.Add ( random.Next ( 10, 100 ) );
  18.             }
  19.  
  20.             foreach ( int number in list.FindAll (i=>i>50) )
  21.             {
  22.                 Console.WriteLine ( number );
  23.             }
  24.  
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment