knascj,
I compiled your code and ran it with the following input:
echo 10 1 100 200 201 210 900 1000 | ./a.out
10 1 20
200 100 125
201 210 125
900 1000 174
sh: pause: command not found
I then I removed the System call system("pause"); and I ran the code again:
echo 10 1 100 200 201 210 900 1000 ...
Search found 3 matches
- Thu Feb 21, 2008 8:48 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 319780
- Thu Feb 21, 2008 8:34 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 319780
- Thu Feb 21, 2008 7:44 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 319780