Challenge for While and For Loops
Challenge
You will be given two numbers a and b. Print out every number from a to b (inclusive). a will always be less than b.
Since we haven't covered printing yet, you can use the included printNum() method to print a number. Just pass it whatever number or variable you want to print. For example,this code will print 5:
printNum(5);
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.