Search found 185 matches

by htl
Tue Jul 02, 2002 6:56 am
Forum: Volume 3 (300-399)
Topic: 337 - Interpreting Control Sequences
Replies: 20
Views: 4391

I've tested my code.(337 < a.in) I tested it with the data below 1 abcde 0 and the output is Case 1 +----------+ | | | | | | | | | | | | | | | | | | | | +----------+ Case 2 +----------+ |abcde | | | | | | | | | | | | | | | | | | | +----------+ I use fflush() because I want to clear the '\n' in the b...
by htl
Mon Jul 01, 2002 6:35 am
Forum: Volume 3 (300-399)
Topic: 337 - Interpreting Control Sequences
Replies: 20
Views: 4391

The only bug is in the way you handle the input, where you miss a linefeed out. for(x=0,y=0;x<line;x++) { fflush(stdin); for(;(c=getchar())!='\n';y++) ^^-->you mean this? buffer[y]=c; } But the problem says "ends of lines in the input are to be ignored" So I think the bugs should be in the other pa...
by htl
Sun Jun 30, 2002 5:59 pm
Forum: Volume 3 (300-399)
Topic: 337 - Interpreting Control Sequences
Replies: 20
Views: 4391

337 - Interpreting Control Sequences

The code I sent doesn't get accepted. It got runtime error. But I rewrite it and check it, I don't know where the bugs are. Can someone help me? [c] #include<stdio.h> #define YES 1 #define NO 0 void main(void) { int count,line,command,overwrite,move,row,col,x,y,tempx,tempy,z; char screen[10][11],c,b...
by htl
Sat Jun 29, 2002 12:50 pm
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8243

Thanks

I follow your suggestion and I got accepted.
And very very thanks!! :D
But I am confused that the description is so tricky that I don't know if I should follow it. Maybe I will ignore them :(
by htl
Sat Jun 29, 2002 6:13 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8243

ACM 476

This problem should be a very easy one. But I don't know why I can't get "accepted". I think the code isn't wrong at all(at least I think so). Can someone find out the bugs? [c] #include<stdio.h> #define YES 1 #define NO 0 void main(void) { int x,n1,n2,found,y; double a,b; char c[2]; struct rectangl...

Go to advanced search