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