Search found 3 matches

by Neon
Thu Jan 09, 2003 7:12 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317984

I am calculating the right answers. But how do I terminate the program?

What I have done is, the program keeps looping until there is input, and terminates when something like ctrl-c is pressed. Is this fine?

I am doing this, because we dont know how many times the program should loop. I usually ...
by Neon
Mon Nov 04, 2002 3:18 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317984

Definition of 100

Can someone please explain how problem 100 should be constructed? Please tell me the type of inputs and type of outputs.

For instance, in my program given below, I keep accepting input until there's no input, with "while(cin>>first>>last)".

Should my program work for specific type of input? if so ...
by Neon
Sun Nov 03, 2002 6:22 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317984

dont understand why

I am having problems with the same. I dont even know whats wrong with my code.

**********************************************************************************************************
[cpp]// @BEGIN_OF_SOURCE_CODE
/* @JUDGE_ID: xxxxxx 100 C++ */

#include <iostream>
#include <stdlib.h>
#include ...

Go to advanced search