char line[255], names[10][12], currline[15][12];
^
this is a problem.
"no name is more than 12 characters in length"
but equal is acceptable.
Try the following test input
2
123456789012 123456789012
123456789012 0 0
123456789012 0 0
and your program write the names[0]="123456789012123456789012 ...
Search found 2 matches
- Thu Mar 13, 2003 10:01 pm
- Forum: Volume 1 (100-199)
- Topic: 119 - Greedy Gift Givers
- Replies: 145
- Views: 47241
- Thu Mar 13, 2003 9:22 pm
- Forum: Volume 4 (400-499)
- Topic: 495 - Fibonacci Freeze
- Replies: 222
- Views: 59875
Re: 495:WHY compile error?
[quote="razibcse"]My prog. always gets Compile error..
result[i--]=char(y+48);
it is a wrong line
the correct is :
result[i--]=(char)(y+48)
but i think it is a slow algoritm, because the input is
4900
4901
...
4999
this program always counted 3 - 4900 fibonacci numbers
result[i--]=char(y+48);
it is a wrong line
the correct is :
result[i--]=(char)(y+48)
but i think it is a slow algoritm, because the input is
4900
4901
...
4999
this program always counted 3 - 4900 fibonacci numbers