0

How can i do it?

first i have to take number of test case then size of array then in the nextline elements of Array...example 2 (ReadLine()) 3 (ReadLine) 1 2 3 Read 1 2(output) Write & WriteLine 2 again same 2 3 7(output).. but when i am trying to take value of 2nd test case...it is actually taking first value of 3rd line...how can i solve this problem?

10th Apr 2018, 5:44 PM
Somnath Ghosh
Somnath Ghosh - avatar
2 Answers
+ 3
string[] arg = Console.ReadLine().Split() int a = int.Parse(arg[0]); int b = int.Parse(arg[1]); I think it will help you.
10th Apr 2018, 5:56 PM
Bartosz Pieszko
Bartosz Pieszko - avatar
0
thank you,,bartosz
10th Apr 2018, 6:52 PM
Somnath Ghosh
Somnath Ghosh - avatar