Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (true)
- {
- int n = int.Parse(Console.ReadLine());
- if (n % 2 == 0)
- {
- Console.WriteLine("Please write an odd number.");
- }
- else
- {
- Console.WriteLine($"The number is: {Math.Abs(n)}");
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment