Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal class Program
- {
- static void Main(string[] args)
- {
- Random random = new Random();
- int minValueNumberN = 10;
- int maxValueNumberN = 25;
- int startNumber = 50;
- int endNumber = 150;
- int numberN = random.Next(minValueNumberN, maxValueNumberN + 1);
- int result = 0;
- for (int i = startNumber; i <= endNumber; i += numberN)
- {
- if (i <= startNumber)
- {
- result++;
- }
- }
- Console.WriteLine($"Количество чисел от {startNumber} до {endNumber} кратны {numberN}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement