Information Technology Grade 10 DIV and MOD Functions

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

INFORMATION TECHNOLOGY

GRADE 10
DIV and MOD Functions

Question 1

Write a program that allows the user to a value representing seconds. The user must
then be able to click a “calculate button” to display the number of hours, minutes and
seconds it represents.

Test your program with the following data:

Seconds Hours Minutes Seconds


125 0 2 5
3661 1 1 1
70000 19 27 40

Question 2

There are 12 inches in a foot, so 16 inches represents 1 foot and 4 inches.

Similarly, 75 inches represents 6 feet and 3 Inches Feet Inches Metres


inches. 60 5 0 1.52
65 5 5 1.65
To convert from inches to centimetres, we 70 5 10 1.78
simply multiply the inches by 2.54, as there are 72 6 0 1.83
2.54 cm in an inch.

Therefore 75 inches = 2.54 X 75 m = 191 cm = 1.91m


Write a program that will allows the user to enter a value in inches and then
to be able to click a “calculate button” display the equivalent value in feet and inches and
metres (correct to decimal places). Test your program with the data above.

Question 3

In Uzbekistan, the currency is called the Drog. One 1 Drog comprises 22 Blats, 1 Blat
comprises 10 Zits and 1 Zit represents 5 Katz

Write a program that will allow the se to enter a value of Katz Drogs Blats Zits Katz
Katz. The user must then be able to click a “calculate
5988 5 9 7 3
button” to display the number of Drogs, Blats, Zits and
Katz this represents. 60000 54 12 0 0
Use the test data shown to test your program. 634123 576 10 4 3

Hint: Do not get thrown by the funny words! How would you go about his if it were a
days, hours, minutes and seconds program, with the seconds given as input?

You might also like