|
|
вернуться в форум int a, b, c; a=Console.Read(); b = Console.Read(); c = a + b; Console.Write(c); what is there wrong? int[] nums=Console.ReadLine().Split(new char[]{'\n','\t',' '}, StringSplitOptions.RemoveEmptyEntries).Select(s=> int.Parse(s)).ToArray(); Console.WriteLine(nums[0]+nums[1]); go and learn C# Edited by author 01.09.2010 19:13 Is not any easier way? Edited by author 02.09.2010 17:33 Edited by author 02.09.2010 17:33 There is a short way of writing that: String[] s; s = Console.ReadLine().Split(); Console.WriteLine(int.Parse(s[0])+int.Parse(s[1])); int a, b, c; a=Console.Read(); b = Console.Read(); c = a + b; Console.Write(c); what is there wrong? |
|
|