Table of Contents
3 - Řídicí struktury
Procvičovaná témata
Úkoly
Jednoduchý automat na mince
3 - Řídicí struktury
pro vyučující:
03
Procvičovaná témata
řídicí struktury
Úkoly
Vypište čísla od 1 do 10 s využitím cyklů
for
,
while
a
do-while
.
Nahraďte terminační podmínku příkazem
break
.
Jednoduchý automat na mince
Napište program, který pro zadanou částku (v celých korunách) vypíše nejmenší počet mincí (20, 10, 5, 2, 1), ze kterých se dá daná částka složit.
Rozšiřte program tak, aby vypisoval pouze použité mince.
Nechte program vypsat vloženou částku i v jiných měnách.