Saturday, 1 November 2014

C# SOLUTION TO SPOJ PROBLEM 1:TEST

Problem Link : Life, the Universe, and Everything

Code:

using System;
public class Test
{
    public static void Main()
    {
        int a=0;
        a=int.Parse(Console.ReadLine());
        while(a!=42)
        {
            Console.WriteLine(a);
            a=int.Parse(Console.ReadLine());
        }
        // your code goes here
    }
}

3 comments: