Mathematical and Physical Journal
for High Schools
Issued by the MATFUND Foundation
Already signed up?
New to KöMaL?

Problem I. 140. (October 2006)

I. 140. Prepare a program to simulate falling characters on the screen. Your program should read the initial state from a file and print this text on the screen. Then in every tenth of a second a random character should be chosen and moved one line below, replacing the original position of the letter with a space. A letter can not fall further down if there is a non-space character just below it or if it hit the bottom of the screen.

The name of the input file is i140.txt. The file contains 25 lines, each line has 80 characters containing only letters, spaces or numerals.

The simulation ends when no more characters can fall. Your program then should print the message ``Every character has fallen off'' in the upper left corner and wait for Enter to be pressed.

The source code (i140.pas, i140.cpp, ...) should be submitted.

(10 pont)

Deadline expired on November 15, 2006.

Sorry, the solution is available only in Hungarian. Google translation

Az alábbi file tartalmazza a mintamegoldást, illetve a megoldások ellenőrzéséhez használt tesztadatot.



25 students sent a solution.
10 points:Biró János, Danka Miklós András, Fehér András, Györök Péter, Hunyady Márton, Kiss Dániel Miklós, Kovács 129 Péter, Polgárfi Bálint, Szoldatics András, Véges Márton, Vincze János.
9 points:Balambér Dávid.
8 points:2 students.
7 points:2 students.
4 points:3 students.
2 points:2 students.
0 point:4 students.

Problems in Information Technology of KöMaL, October 2006