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