|
|
вернуться в форумWhy WA? using System; using System.Collections; class Program { static void Main(string[] args) { string str = ""; str = Console.ReadLine(); string x = ""; bool f = false; while (true) { if (str[0] == ' ') { str = str.Remove(0, 1); } else { break; } } ArrayList array = new ArrayList(); while (true) { if (str != "" && !str[0].Equals(' ')) { x += str[0]; f = true; } else if (f.Equals(true)) { array.Add(x); x = ""; f = false; } if (str != "") str = str.Remove(0, 1); else break; } for (int j = array.Count - 1; j >= 0; j--) { Console.WriteLine("{0:f4}", Math.Sqrt(double.Parse(array[j].ToString()))); } } } |
|
|