Alice programming help? 10 pts?

I'm having trouble with my Alice programming hw. We're supposed to make Alice say: "I can count in any multiples you like. Give me a number and I can tell you the first 4 multiples of that number." I got that part but the hard part is:

Alice asks you for a number and then alice says the first 5 multiples of that number.


2 Answers

  • 8 years ago
    Favorite Answer

    You never mentioned what programming language you are using... In pseudocode:

    input = getUserInput

    for (i = 1 to 5)

    ...print(getUserInput * i)

    You have to use a for loop that counts from 1 to 5, and in each loop print out the number multiplied by the number of times the loop has run. This will give the first 5 multiples.

  • 8 years ago

    Who is Alice? Your mother? sister? girlfriend?

Still have questions? Get your answers by asking now.