Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication39
- {
- class Program
- {
- static void Main(string[] args)
- {
- int nr = 0;
- int counter = 0;
- int devision_nr = 0;
- Random r = new Random();
- nr = Convert.ToInt32(Console.ReadLine());
- while (nr < 500)
- {
- Console.WriteLine("Pick a number larger than 500!");
- }
- while (counter < 25 && nr != 1)
- {
- devision_nr = r.Next(1, 10);
- if (nr % devision_nr == 0)
- {
- nr = nr / devision_nr;
- Console.WriteLine(nr);
- }
- counter++;
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement