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 = 0;
- do
- {
- num = int.Parse(Console.ReadLine());
- if (num % 2 != 0)
- {
- break;
- }
- Console.WriteLine("Please write an odd number.");
- num = int.Parse(Console.ReadLine());
- } while (true);
- Console.WriteLine("The number is: {0}",Math.Abs(num));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement