Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication7
  8. {
  9.     class Program
  10.     {
  11.        
  12. static void Main(string[] args)
  13.         {
  14.             Random r = new Random();
  15.             int[] array;
  16.             array = new int[44];
  17.  
  18.             for(int i = 0; i < array.Length; ++i)
  19.             {
  20.                 array[i] = r.Next(100, 999);
  21.             }
  22.  
  23.             for(int i = 0; i < array.Length; ++i)
  24.             {
  25.                 if(array[i] % 3 == 0)
  26.                 {
  27.                     Console.WriteLine(array[i]);
  28.                 }
  29.             }
  30.             Console.ReadKey();
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement