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