☰ Contents · Computing

Branching algorithms

Lessons 14–15 · 2 lessons · M. R. Fayziyeva, D. M. Sayfurov, N. S. Xaytullayeva. Informatics and Information Technologies, Grade 9. “Nashriyot uyi Tasvir”, Tashkent, 2020
Answers are for parents and teachers.
1
Write, in the short form and in words, an algorithm that calculates the cube of a given whole number a if a is divisible by 3.
2
Write in words the branching algorithm for finding the smallest of three numbers a, b, c.
3
What is the taxi fare (15 000 up to 5 km, then 2 000 so‘m per km) for 12 km?
4
The sign function: y = –1 (x<0), 0 (x=0), 1 (x>0). Write y for x = 0 and x = 3.5.