Skip to content

Commit 1e248be

Browse files
authored
TEST - Life, the Universe, and Everything
1 parent ce5ed3f commit 1e248be

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

SPOJ/TEST.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/* SPOJ */
2+
/* Title - TEST - Life, the Universe, and Everything */
3+
/* Created By - Akash Modak */
4+
/* Date - 04/09/2020 */
5+
6+
7+
// Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.
8+
9+
10+
// Example
11+
// Input:
12+
// 1
13+
// 2
14+
// 88
15+
// 42
16+
// 99
17+
18+
// Output:
19+
// 1
20+
// 2
21+
// 88
22+
23+
#include <iostream>
24+
using namespace std;
25+
26+
int main() {
27+
// your code goes here
28+
int n;
29+
cin>>n;
30+
while(n!=42){
31+
cout<<n<<"\n";
32+
cin>>n;
33+
}
34+
return 0;
35+
}

0 commit comments

Comments
 (0)