Advertisement
mess0011

ue4_4

Oct 31st, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 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 ConsoleApplication41
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int product = 1;
  14.             Random a = new Random();
  15.            
  16.             while(product<1000)
  17.             {
  18.                 int nr = a.Next(1, 10);
  19.                 Console.WriteLine(nr);
  20.  
  21.                 product = product * nr;
  22.  
  23.             }
  24.             Console.WriteLine("the product of the numbers is {0}", product);
  25.             Console.ReadLine();
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement