| 
 | 
back to boardПочему не получается? C# Posted by  Юрий 25 Mar 2016 11:48 Пишу на C#: using System;   namespace Timus_Console {     class Program     {         static void Main(string[] args)         {             int ans1 = Convert.ToInt32(Console.ReadLine());             int ans2 = Convert.ToInt32(Console.ReadLine());             int st = ans1 + ans2;             Console.WriteLine(st);             Console.ReadKey();         }     } }   Edited by author 25.03.2016 11:48 Re: Почему не получается? C# Не могу не чем помочь. Пишу на Питоне и Паскале Re: Почему не получается? C# Please read: http://acm.timus.ru/help.aspx?topic=judge&locale=en"The program must print only the data that is required by the problem statement. The program must not print any prompts (“Enter N:”). The program must not wait for pressing a key at the end of execution"  Also you should make your program passing task sample. Both numbers are on the same line in the sample. Re: Почему не получается? C# тоже не пойму в чем прикол, VS studio все ок работает, а на сайте при отправке ошибка компиляции. Какой синтаксис он использует при проверке Пишу на C#:   using System; /*Вычислите a+b (1 5)  1000. A+B Problem */ namespace A_B_Problem {     public class Program     {         static void Main(string[] args)         { int a = 5; int b = 1; int c = a + b;             Console.WriteLine(c);             Console.ReadLine();         }     } } Re: Почему не получается? C# в конце программы не нужен пустой Console.ReadLine() или .ReadKey(), только вывод ответа  |  
  | 
|