Welcome! This respository is where you will be working for your activity Loop A User Interaction.
- You need to enter to the folder activity/main/java/pltl/activities.
- Open the LoopInteraction.java file.
- Click on the pencil (edit this file) in the right upper corner of your file to start working!
- You can copy the code to you VSCode and work from there (recommended) or you can directly work from GitHub.
- When you're done, you paste the code in your LoopInteraction.java and click on commit changes and that's it!
For this activity, you can check what you need to do in the following link https://docs.google.com/presentation/d/1eF3rXUwJQ3nV0KGlyXaBxGiw9kMsrwDlaYj5uzfdnKg/edit#slide=id.g153a7eb9eae_0_127
Or you can keep reading!
For the Loop A User Interaction, you need to:
Ask the user to enter:
- A number n
- User’s name Generate n times the name. Use the 3 types of loops: for-loop, while-loop, do-while loop Identify:
- The loop’s body
- The required control variable
- The boolean condition Update your control variable
After compiling and running your program, this is the expected output:
n: 5
Name: Turing
for: Turing, Turing, Turing, Turing, Turing
while: Turing, Turing, Turing, Turing, Turing
do while: Turing, Turing, Turing, Turing, Turing