Search found 2 matches
- Tue Jan 21, 2003 5:34 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317862
Thanks
Thanks I've sorted it now.
- Thu Jan 16, 2003 2:58 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317862
100 Why WA???
Can someone plz tell me what's wrong:
[cpp]
#include <iostream>
using namespace std;
main (void)
{
int a, i, j, il, c;
while (cin >> i >> j)
{
cout << i << " " << j << " ";
if (i > j)
{
c = i;
i = j;
j = c;
}
c = 0;
for (int n = i; n <= j; n++)
{
a = n;
il = 1;
while (a != 1 ...
[cpp]
#include <iostream>
using namespace std;
main (void)
{
int a, i, j, il, c;
while (cin >> i >> j)
{
cout << i << " " << j << " ";
if (i > j)
{
c = i;
i = j;
j = c;
}
c = 0;
for (int n = i; n <= j; n++)
{
a = n;
il = 1;
while (a != 1 ...