Search found 5 matches

by silvere
Tue Nov 01, 2005 4:59 am
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 44709

444:why i get COMPILE ERROR?

run:gcc -g -o coder coder.c
ok.

but i get CE.WHY?

(forgive my poor english and so many functions;-)


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

int reverse(char* str)
{
char c;
int i,j;
i=0;
j=strlen(str)-1;
while(i<j)
{
c=str[i];
str[i]=str[j];
str[j]=c;
i++;
j ...
by silvere
Mon Oct 31, 2005 9:57 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318836

the input() function is of no use.

sorry for that.
by silvere
Mon Oct 31, 2005 9:56 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318836

problem 100:runtime error.

compile and run ok with gcc under linux.

but when i submit my code,runtime error!

why?

thx.

#include <stdio.h>
#include <stdlib.h>
#define MAXNUMBER 1000000

int input(int *a,int *b)
{
*a=0;
*b=0;
scanf("%d %d",a,b);
if(*a<=0 || *b<=0)
{
return 0;
}
return 1;
}

int cycle_length(int i ...
by silvere
Mon Oct 31, 2005 9:54 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318836

the input() function is of no use.

sorry for that.
by silvere
Mon Oct 31, 2005 9:52 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318836

why i get runtime error?

compile and run ok with gcc under linux.

but when i submit my code,runtime error!

why?

thx.

#include <stdio.h>
#include <stdlib.h>
#define MAXNUMBER 1000000

int input(int *a,int *b)
{
*a=0;
*b=0;
scanf("%d %d",a,b);
if(*a<=0 || *b<=0)
{
return 0;
}
return 1;
}

int cycle_length(int i ...

Go to advanced search