Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace RoundingNumbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- double[] arr = Console.ReadLine().Split().Select(double.Parse).ToArray();
- for (int i = 0; i < arr.Length; i++)
- {
- Console.WriteLine($"{Convert.ToDecimal(arr[i])} => {Math.Round(Convert.ToDecimal(arr[i]), MidpointRounding.AwayFromZero)}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement