Exercises and problems in Informatics
Please read The Conditions of the Problem Solving Competition.
I. 40. Every row, column and both main diagonals of the square in the figure contain a prime number with five digits when rows and the diagonals are read from left to right, and columns from top to bottom. Moreover,
Your program (I40.pas, ...) should read the sum of the digits of the prime numbers, further the digit to be placed into the top left corner, then display the corresponding square.
In the example, the sum of the digits=11, while the top left digit=1.
I. 41. A square is divided into smaller light or dark squares. We can obtain different figures by rotating the original square or reflecting it around its axes of symmetry. (However, it may happen that some transformations, or combination of transformations produce the same - possibly the original - figure.)
Write your program (I41.pas, ...) which reads the colouring of the NxN square using the symbols V (=light) and S (=dark), successively representing in each row the colours of the small squares, then displays the square together with all different images under all combinations of transformations.
The example shows for N=3 the original square=((S,S,V),(V,V,V),(V,S,S)) and all possible images under the transformations.
I. 42. The exchange rates between 100 units of some foreign currency and HUF (=Ft) are stored in a table. For example, 100 AUD is worth 13279 HUF.
Prepare a sheet (I42.xls) which - using a fixed table of foreign currency - computes all the exchange rates in the fourth column if any amount of a single (but arbitrary) currency in the third column has been entered.
See the examples.