yes.
The program below should print out the even numbers between 20 and 40, inclusive, but the code is mixed up and contains extra blocks. Put the necessary blocks in the correct order.
repeatHello
function. repeatHello
should be a void
function that takes no arguments and uses a while
loop to print out “hello” three times.
repeatHello
function so that it repeats a given string three times. Let’s write the code for the repeatString
function, which takes input as a parameter and uses a while
loop to print out the string three times.
repeatString
so that it repeats a given string a given number of times. Let’s write the code for the new repeatString
function, which takes input
and x
as parameters and uses a while
loop to print out the string x
number of times.
newYearCountdown
, which prints out a countdown from 10 and then prints out “Happy New Year!”.