I am trying to go for:
IDEONE is correct but always gives my NZEC error:
Here’s my tries without core code (i am using p array of results)
Here’s try like in sticked topic:
using System;class P{static void Main()
…int n;while((n=int.Parse(Console.ReadLine()))!=42)Console.WriteLine(p[n]);}}
Here’s my other try:
....string s;while((s=Console.ReadLine())!=null)Console.WriteLine(p[int.Parse(s)]);}}
And other one
...string s;while(!String.IsNullOrEmpty(s=Console.ReadLine()))Console.WriteLine(p[int.Parse(s)]);} }