Java 6: Using for loops to get multiple user input

preview_player
Показать описание
In this video, we use a for loop to run a number of times as we specify, so instead of defining 4 variables, we can use only 1 variable, and reuse it to find the average of numbers.

Рекомендации по теме
Комментарии
Автор

I think you are a experienced programmer
This helped a lot.

PrakharNTejas
Автор

I think that even using if-else you can use a specific message, it only depends of the i value.
Great video!!!

pvs_np
Автор

Thank you. This is exactly what I was looking for 😀

trueUtd
Автор

Thank you so much! your video saved me!!!

aichuliam
Автор

awesome finally did it with this video

Storytime-Kahaniyan
Автор

Hello, great video! Please how do I take one input at a time but print out multiple outputs at once? for example: An input to withdraw then deposit then withdraw again and another deposit but when it prints it prints out one output for all inputs that i made for example the output would be:
balance: 54
balance: 30.4
balance: 50.0
balance: 100
?

migo
Автор

Hello, love your videos.
How would you write a program where the user inputs 2 numbers to be multiplied and it runs on a loop 3 times. each time asking the user to input numbers.

griselortiz
Автор

Hello. How does each loop have its own variable/declaration? thanks for answering.

alpondaver.santillan
Автор

What if I don't want just 4 numbers, but any amount that the user decides to enter? The thing is, I don't want to ask the user how many inputs they would like to input, I want them to just be able to type in as many as they want.

j_rryplays
Автор

hello. how to add two user inputs in for loop?

rommeljohnang
Автор

What if I have series of input in single line like
Input:1 2 3 4 5
Output:15-sum

darpanrajput
welcome to shbcf.ru