Questions tagged as 'bucle-for'

2
answers

Javascript Structure For

This sequence does not give the expected results. The result of "n" should be 512 and not 2 as given as written. var n=1; for (var t1=0;t1<3;t1++){ for (var t2=0;t2<3;t2++){ for (var t3=0;t3<3;t3++){ for (va...
asked by 11.06.2018 / 17:56
2
answers

Create .click triggers inside a for loop

I have the following code: $(document).ready(function(){ console.log($("body").find("form label input")); //da un objeto, una lista, con los diferentes inputs dentro del label dentro del form for (var i = 0; i < $("body").find("form l...
asked by 28.04.2017 / 00:46
3
answers

Rotate php array position

Basically I have to move a position of the array (the position 0 to 1, the 1 to the 2, so on until the last position that moves to the first) Example: Array = 1/5/7/9/14/12 Change of position = 12/1/5/7/9/14 The variable $ num, I use to know the...
asked by 13.12.2018 / 17:07
1
answer

Show laps of a for in time intervals

The following is more than anything a query. We have a simple cycle: for ($i = 1; $i <= 10; $i++){ echo $i."</br>"; } As we already know at the time of executing this code, all the results will be displayed once and in this case...
asked by 27.12.2018 / 22:02
2
answers

Declare the second dimension of a stepped array

I have to do a stepped array, but I do not know how to do it so that at the time of asking the columns of the array are declared within the loop, the program should do this as many times as players put it. Exit of the program Enter the num...
asked by 16.12.2018 / 13:02
1
answer

How to print all the divisible numbers of a number entered by keyboard? Java For

Hello, good, I'm doing a program where I must perform the division of two numbers and if it evaluates if the first number is divisible by the divisor, if so, print all the divisible divisible numbers. So far I did odd and even numbers, but it on...
asked by 02.12.2018 / 02:17
1
answer

How to solve average within the for? Java Cycle For

It is requested to develop the algorithm to manage the grades of the students of basic programming I. It is known that the number of students is 10. You should be able to enter: a. Student ID b. Career (w - Technician in Development o...
asked by 05.10.2018 / 01:26
2
answers

How do I do this program? [closed]

Enter a group of 20 people and only count those who are between 18 and 45 years old. The problem is that I do not know how to put the condition of counting ages between 18 and 45. int personas = 21; int edadDe18A45 = 0; int edad...
asked by 28.08.2018 / 21:49
1
answer

Loop for nested and concatenate array

I have the following loop: var miArray = [ 10, 20, 40, 65 ]; var miArray2= [15, 26, 44, 71]; for (var i=0; i<miArray.length; i++) { for (var j=miArray[i]; j<=miArray2[i]; j++) { console.log(j); } } ... And I need to concatenate to...
asked by 14.08.2018 / 18:39
1
answer

go through an object and send the data to firebase

So far I have the following code, I get an object and with a for what I'm going through: for (var i = 0; i < data.length; i++) { console.log("datos completos -> " + data[i].id_expediente); //acceder a mis datos de fi...
asked by 26.06.2018 / 17:06