Changing the data type and a test
Answers are for parents and teachers.
1
Find the volume (a * a * a) and the surface (6 * a * a) of a cube with a = 3.
27 and 54
2
What result does the factorial program (f := f * i) give for n = 4?
24
3
After s := 0; for i := 2 to 5 do s := s + i; what is s?
14
4
Write the statement that shows the square of the number in Edit1.Text in Label1.
Label1.Caption := IntToStr(StrToInt(Edit1.Text) * StrToInt(Edit1.Text));
5
Why must you know the decimal separator (point or comma) of the computer settings when entering real numbers?
StrToFloat recognises only the separator in the settings; another one gives an error message.