SPOJ Solution 1 - Life, the Universe, and Everything | Classical Problem Solution - Online Judge Solution

Latest

It is a free Online judges problems solution list. Here you can find UVA online Judge Solution, URI Online Judge Solution, Code Marshal Online Judge Solution, Spoz Online Judge Problems Solution

Wednesday, May 10, 2017

SPOJ Solution 1 - Life, the Universe, and Everything | Classical Problem Solution

SPOJ Solution 1 - Life, the Universe, and Everything | Classical Problem Solution


Sphere Online Judge Solution  1 - Life, the Universe, and Everything
Sphere OJ  Main Problem Link - http://www.spoj.com/problems/TEST

Problem Name: SPOJ Problem   1 - Life, the Universe, and Everything
Problem Number : SPOJ Problem   1 - Life, the Universe, and Everything
Online Judge : SPOJ Online Judge Solution
Solution Language : C,CPP
Category : Classical
SPOJ Solution 1 - Life, the Universe, and Everything Code in C, CPP:

SPOJ Solution 1 - Life, the Universe, and Everything | Classical Problem Solution

SPOJ Classical 1 - Test Code in C :

#include<stdio.h>
int main()
{
    int n;

    while(1)
    {
        scanf("%d",&n);
        if(n==42)
            break;

        printf("%d\n",n);
    }

    return 0;
}



SPOJ Classical 1 - Test Code in Cpp :

#include<iostream>
#include<cstdio>

using namespace std;

int main(){
    int n;
    
    while(1){
        scanf("%d",&n);
        if(n==42) break;
        
        printf("%d\n",n);
    }
    
    return 0;
}


Tags: SPOJ OJ Solutions, SPOJ solution 1 - Life, the Universe, and Everything, Sphere online Judge Solution 1, Classical Problem 1

No comments:

Post a Comment