Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- internal class Program
- {
- static void Main(string[] args)
- {
- int minValue = 50;
- int maxValue = 150;
- int minNumber = 10;
- int maxNumber = 25;
- int amountMultiplies = 0;
- int number = new Random().Next(minNumber, maxNumber + 1);
- Console.WriteLine($"Число N: {number}");
- for (int i = number; i <= maxValue; i += number)
- {
- if (i >= minValue)
- {
- amountMultiplies++;
- }
- }
- Console.WriteLine($"Число N кратно {amountMultiplies} числам в деапазаноне от {minValue} до {maxValue}");
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement