Mailing List Archive


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

[tlug] C puzzle




This C program:

main() {
  int i, n=20;
  for(i = 0 ; i < n ; i--)
    printf("-");
}

Can be modified into a correct program for printing 20 '-' characters in a
row by replacing a single character of the code.

In fact, there are three different ways to do it.

Who can find all three?

(Not strictly linux related but seemed vaguely on topic :-) )
-- 
Tod McQuillin



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links