ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1000. A+B Problem

aleko please help...... [6] // Задача 1000. A+B Problem 1 сен 2010 15:14
            int a, b, c;
            a=Console.Read();
            b = Console.Read();
            c = a + b;
            Console.Write(c);

what is there wrong?
Andrew Shmig [VlSU] Re: please help...... [3] // Задача 1000. A+B Problem 1 сен 2010 18:23
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
aleko Re: please help...... [2] // Задача 1000. A+B Problem 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
Eugen [RTF UFU] Re: please help...... // Задача 1000. A+B Problem 9 сен 2010 16:52
Паскаль рулит :)
xerxe Re: please help...... // Задача 1000. A+B Problem 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]));
RujinCao Re: please help...... // Задача 1000. A+B Problem 11 сен 2010 19:31
I highly recommend you to read some C# tutorials.
Here is a good start:
http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx

PS: Console.Read can only read the next character from input stream.See more information at:
http://msdn.microsoft.com/en-us/library/system.console.read.aspx
HUMOYUN_220-10 Re: please help...... // Задача 1000. A+B Problem 13 окт 2010 14:30
aleko писал(a) 1 сентября 2010 15:14
            int a, b, c;
            a=Console.Read();
            b = Console.Read();
            c = a + b;
            Console.Write(c);

what is there wrong?