Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] C puzzle



2 more problems on the same one. Both with 1 character replacement.
	How to get 21 "-" chars output?
	How to get 1? (Ooops. Sorry for this one!)

br.


On Fri, 2002-07-26 at 01:54, Viktor Pavlenko wrote:
> >>>>> "TM" == Tod McQuillin <devin@example.com> writes:
> 
>     TM> This C program:
> 
>     TM> main() {
>     TM>   int i, n=20;
>     TM>   for(i = 0 ; i < n ; i--)
>     TM>     printf("-");
>     TM> }
> 
>     TM> Can be modified into a correct program for printing 20 '-'
>     TM> characters in a row by replacing a single character of the
>     TM> code.
> 
>     TM> In fact, there are three different ways to do it.


-- 
"Is that all?" asked Alice.
"That is all." said Humpty Dumpty. "Goodbye." -- Lewis Carrol

Attachment: signature.asc
Description: This is a digitally signed message part


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links