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 Task17
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Random random = new Random();
- int number;
- int minRandom = 1;
- int maxRandom = 28;
- int minValue = 100;
- int maxValue = 999;
- int sum = 0;
- number = random.Next(minRandom,maxRandom);
- Console.WriteLine(n + "\n");
- for (int i = minValue; i <= maxValue; i++)
- {
- for (int j = i; j >= 0; j -= number)
- {
- if (j == 0)
- {
- sum++;
- Console.WriteLine(i + " число. " + sum + " количество похожих.");
- }
- }
- }
- Console.WriteLine(sum);
- }
- }
- }
Add Comment
Please, Sign In to add comment