Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp8
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num = 0;
- while (true)
- {
- num = Math.Abs(int.Parse(Console.ReadLine()));
- if (num % 2 == 1)
- {
- Console.WriteLine("The number is: " + num);
- break;
- }
- Console.WriteLine("Please write an odd number.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement