Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp19
- {
- class Program
- {
- static void Main(string[] args)
- {
- int IntV;
- int finV;
- int stepV;
- Console.WriteLine("Please enter your initial value.");
- IntV = int.Parse(Console.ReadLine());
- Console.WriteLine("Please enter your final value.");
- finV = int.Parse(Console.ReadLine());
- Console.WriteLine("Please enter your step value.");
- stepV = int.Parse(Console.ReadLine());
- for (int i = IntV; i < finV; i += stepV)
- {
- Console.WriteLine("{0}", i);
- }
- for (int i = IntV; i > finV; i -= stepV)
- {
- Console.WriteLine("{0}", i);
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement