Search found 5 matches

by eureka
Sat Nov 16, 2002 3:45 pm
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 43860

really?

I submit my code with c++ ,and then "acc"
it's so strang!
by eureka
Fri Nov 15, 2002 5:27 am
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 43860

have another error

thank you kmhasan but what the following error messege mean? 01238360_24.c: In function `rever_str': 01238360_24.c:17: parse error before `int' 01238360_24.c:18: `j' undeclared (first use in this function) 01238360_24.c:18: (Each undeclared identifier is reported only once 01238360_24.c:18: for each...
by eureka
Sun Nov 10, 2002 11:53 am
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 43860

713

who can tell me why my code is compile error? what should be attention when programming with c because I use turbo c but judge is gcc #include <stdio.h> #include <stdlib.h> #include <string.h> void rever_str(char *s) { int len = strlen(s); int i,j; j = 0; int tem ; tem = len ; while (s[len-j-1] == '...
by eureka
Sat Sep 21, 2002 5:48 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 209475

thank everybody! I have correct my code like this #include <stdio.h> #include <math.h> int main() { long n[10001]; long i,j; long cou,len,a ,temp; for (long p = 1;p<=10000;p++) { n[p] = 1; len = 1; a = p; while (a!=1) { if (fmod(a,2) == 1) a = 3*a + 1 ; else a = a/2; len++; } n[p] = len; } while (sc...
by eureka
Sun Sep 15, 2002 11:21 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 209475

help p100

why my code is compile error. who can help me :x #include <stdio.h> #include <math.h> int main() { long n[10001]; long i,j; long count,len,a ; for (long p = 1;p<=10000;p++) { n[p] = 1; len = 1; a = p; while (a!=1) { if (fmod(a,2) == 1) a = 3*a + 1 ; else a = a/2; len++; } n[p] = len; } while (scanf(...

Go to advanced search