Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = Convert.ToInt32(Console.ReadLine());
- int b = Convert.ToInt32(Console.ReadLine());
- List<int> result = new List<int>();
- for (int i = a; i <= b; i++)
- {
- if (i%2==1)
- {
- result.Add(i);
- }
- }
- Console.WriteLine(String.Join(" ", result.ToArray()));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement