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 Loops
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Enter lower number: ");
- int low = int.Parse(Console.ReadLine());
- Console.Write("Enter high number: ");
- int high = int.Parse(Console.ReadLine());
- Console.Write("Enter step: ");
- int step = int.Parse(Console.ReadLine());
- for (int i = low; i <= high; i += step)
- {
- Console.Write($"{i} ");
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement