Questions tagged as 'bucle-for'

1
answer

Doubt for-in loop in Swift

I'm trying to do the following exercise in Swift: Create the function obtenerFrecuencias that allows you to calculate the frequencies of a set of answers, numbers between 0 and 9, which are stored in an array of Int. Example: l...
asked by 07.06.2018 / 02:02
4
answers

How do I show the result of a loop in a table?

I am trying to make a page that shows the conversion of 1 to 10 dollars, dollar for dollar and that is printed using a while loop but inside a table, but until now I have not been successful. The code that I created goes something like this: &...
asked by 03.08.2017 / 19:59
1
answer

When do I have to use a while or a do while? [closed]

Good I wanted to know when I realize when I have to use while or do while to make a program, because I've seen people who say: "no I would not do this with a for, you can use the while or do while".     
asked by 27.11.2018 / 17:37
1
answer

How can I solve this program? Java Cycle For

It is necessary to develop a program that allows managing the information to organize the fifth edition of a marathon. It is known that: For organizational matters, a maximum amount of 15,000 is allowed (but I put 5 in the program to be able...
asked by 04.10.2018 / 18:21
2
answers

Why does not the if function?

Enter the result of 4 matches played between team A and team B. Determine and report the number of matches won by each and the winner of more matches if they did not get the same results. This time my problem is that if I enter the same numbe...
asked by 27.08.2018 / 02:20
2
answers

Problem in entering data by keyboard with java

I was trying to do this program, the main problem is that it only lets me enter the value I want to give to numeroN , then it does not let me write by console and in the summation I get that is equal to zero, I wanted to know if someone ca...
asked by 05.08.2018 / 03:16
1
answer

Use variable out of cycle for NodeJS

I am trying to fill an array using the 'push' function within a for loop, but calling the array out of the loop is still empty. They could help me understand how this part works. app.get('/ReturnStatus', function(request, response) { var c...
asked by 19.10.2018 / 21:05
1
answer

The first time you enter the for loop iterates twice

That said, the first time you enter the for loop, you iterate it twice. Then it's still normal but that's not how the first one tells me. public static void main(String[] args) { //a uno se le van presentando personas desconocidas exactas...
asked by 19.09.2018 / 12:56
2
answers

Multiply Python arrays

I would like to understand the flow of these loops for at each round, since according to what I understood of matrix multiplication and according to the loop: in the first round    i, j and k would have a value of zero, therefore in...
asked by 23.11.2018 / 19:01
1
answer

for inside another for

I want to do something like this: for(var i = 1; i <= 5; i++){ let ii = i; for(var l = 'a'; l < 'z'; l++){ let ll = l; } } I want the for that is inside the other for to be executed from'a' to'z', 5 t...
asked by 18.07.2018 / 19:47