Search found 1 match

by knascj
Sun Feb 10, 2008 8:44 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318993

Help!
I received a runtime error

#include<stdio.h>
#include<stdlib.h>

int main()
{
int i,j,a[100],b[100],c[100];
int aux,cont=0,n,p,cl,max_cl=0;//cl-cycle lenght
while (scanf("%d %d",&i,&j)!=EOF)
{
if(i>j)
{
aux=i;
i=j;
j=aux;
aux=1;
}

for(n=i;n<=j;n++)
{
cl=1;p=n;
while(p>1 ...

Go to advanced search