Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace cSharpIntro
- {
- public class program
- {
- public static void Main()
- {
- int num = int.Parse(Console.ReadLine());
- while (num % 2 == 0)
- {
- num = int.Parse(Console.ReadLine());
- Console.WriteLine("Please write an odd number.");
- }
- Console.WriteLine($"The number is: {Math.Abs(num)}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement