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