Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal class Program
- {
- static void Main(string[] args)
- {
- int cycleStartNumber;
- int stepSize;
- int maxNumberInCycle;
- Console.Write("Введите число с которого начнется вывод последовательности: ");
- cycleStartNumber = Convert.ToInt32(Console.ReadLine());
- Console.Write("Введите размер шага последовательности: ");
- stepSize = Convert.ToInt32(Console.ReadLine());
- Console.Write("Введите максимальное число последовательности: ");
- maxNumberInCycle = Convert.ToInt32(Console.ReadLine());
- for (int i = cycleStartNumber; i <= maxNumberInCycle; i += stepSize)
- {
- Console.Write($"{i} ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment