Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace ExamPreparation
- {
- class Startup
- {
- static void Main()
- {
- double[] numbers = Console.ReadLine()
- .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
- .Select(double.Parse)
- .ToArray();
- foreach (var number in numbers)
- {
- Console.WriteLine($"{number} => {Math.Round(number, MidpointRounding.AwayFromZero)}");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment