ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1196. History Exam

C# How I can read data??
Posted by Alexandr 14 Oct 2008 20:34
teach=Int32.Parse(Console.ReadLine());
String[] arrTeach = new String[teach]
for (Int32 i = 0; i < teach; i++)
            arrTeach[i] = Console.ReadLine();

//It no worked correct on timus compiler! Why?
Re: C# How I can read data??
Posted by AzizIO 16 Oct 2012 22:01
Console.ReadLine() return string
You should just parse to int

 for (long i = 0; i < M; i++)
     {
       arrS[i] = long.Parse(Console.ReadLine());
    }

in your case arrTeach[i] = int.Parse(Console.ReadLine());
good luck with C# :)
Sorry for my English