Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp9
- {
- class Program
- {
- static void Main(string[] args)
- {
- var values = Console.ReadLine().Split(' '); // Input string 1,2 2,3 4,5 6,7 1,0 double numbers.
- double multiplier = double.Parse(Console.ReadLine()); // multiplier.
- var arr = new double[values.Length]; //Make an array with name "arr".
- for (int i = 0; i < arr.Length; i++) //Convert from string to double,
- {
- arr[i] = double.Parse(values[i]);
- arr[i] *= multiplier; // and multiplier.
- }
- for (int i = 0; i < arr.Length; i++) // Print the result.
- {
- Console.Write(arr[i] + " ");
- }
- Console.WriteLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment