Her code can not calculation for negative number. I fixed it.
void sep(int val){
int i;
if (val<0){
val=-val;
bio_putch(45);
}
if(val/10){
i=val%10;
sep(val/10);
}
else
i=val % 10;
bio_putch(i?i+48;48);
}
void bio_putch(int val){
sep(int val);
}
Friday, January 29, 2010
Subscribe to:
Post Comments (Atom)
I don't see a link to Wen Fang's blog, so how do I know what you fixed?
ReplyDeleteAlso, your default language for your blog is Chinese. I had to guess that what I am clicking on is comment. Please correct this.
Sorry, Iam forgot to set Language to English.
ReplyDeleteAnd Wen Fang's blog link is here