|
|
вернуться в форумplease help...... Послано aleko 1 сен 2010 15:14 int a, b, c; a=Console.Read(); b = Console.Read(); c = a + b; Console.Write(c); what is there wrong? Re: please help...... 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 Re: please help...... Послано aleko 2 сен 2010 16:40 Is not any easier way? Edited by author 02.09.2010 17:33 Edited by author 02.09.2010 17:33 Re: please help...... Паскаль рулит :) Re: please help...... int a, b, c; a=Console.Read(); b = Console.Read(); c = a + b; Console.Write(c); what is there wrong? Re: please help...... Послано xerxe 29 дек 2010 04:19 There is a short way of writing that: String[] s; s = Console.ReadLine().Split(); Console.WriteLine(int.Parse(s[0])+int.Parse(s[1])); |
|
|