Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _03._Rounding_Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- string num = Console.ReadLine();
- string[] item = num.Split();
- double[] arrNum = new double[item.Length];
- for (int i = 0; i <= item.Length-1; i++)
- {
- arrNum[i] = double.Parse(item[i]);
- }
- for (int i = 0; i <=item.Length-1; i++)
- {
- Console.WriteLine($"{arrNum[i]} => {Math.Round(arrNum[i])}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement