Questions tagged as 'bucles'

2
answers

Can a variable be used in different loops?

I know it's very basic, but I just started with programming. It would be about c #. I want to count down from a number to 0 using 3 different loops that are in the same method (button1_Click). Can I use the and as a variable for the 3 loops?...
asked by 12.11.2018 / 01:33
3
answers

Cycle for javascript

Hello I tried to do the following but I do not understand, could someone explain me? please Create an empty vector. Using a repetitive structure, request the loading of elements by keyboard until zero is entered. Do not store said value in th...
asked by 02.05.2017 / 13:11
1
answer

Loop PHP counter with a foreach

I have this code that generates a list of the best rated posts and works perfectly. echo "<div class='col-md-10'>"; echo '<ul>'; foreach ($posts as $post) { echo "<li class='f$post->ID'><a href='".get...
asked by 27.09.2018 / 04:09
1
answer

Update parameters b, and with loop

I have the following code, I need b, and they are updated try a for in the end of the code to update the values of the beginning but it did not give a good result. Code import scipy.optimize from scipy import optimize import numpy as np fro...
asked by 25.03.2017 / 06:11
1
answer

I want to read lines from a file and it does not work for me JAVA

Very good guys! I'm trying to read lines of a type ".txt" even though I have it in .test, it's the same. What I have to do is read the first 6 lines, and then read the lines one by one (every time I enter ENTER I go to the next line) until there...
asked by 27.12.2018 / 01:07
1
answer

c ++ error passing 'const std :: vectorNode' as 'this' argument discards qualifiers

I am implementing a minimal path search algorithm, and I get several errors that I do not understand: set< vector<Nodo>>&::iterator it; for(it=nodos_visitados.begin(); it!=nodos_visitados.end();it++){ for(int i=(*it);i&l...
asked by 13.11.2018 / 20:48
3
answers

Take value out of a while in php

The problem I have is the following. I have this part of the code with which I show games in the database: $catalogo = mostrarCatalogo(); while($row2 = mysqli_fetch_assoc($catalogo)){ echo' <div class="producto">...
asked by 05.06.2018 / 08:40
3
answers

How do I get an array with numbers and letters and a space to add up and form a word?

The exercise would be like this: const array_A = ["H",3,"o",4,"l",5,"a",6," ",7,"M",8,"u",9,"n",10,"d",11,"o"] const array_B = ["s",1,"t",2,"a",3,"c",4,"k"] const array_C = ["o",1,"v",2,"e",-3,"r","f","l","o","w"] You would have to see th...
asked by 16.10.2018 / 18:43
2
answers

while not running

In the following code, the second while is never executed, what is the reason? int main(){ int a,b; int producto=0; int cociente=0; printf ("Escribe primer número.\n"); scanf ("%d", &a); printf ("Escribe se...
asked by 29.05.2018 / 00:44
3
answers

Use of accumulators in matrix element and iteration counter in Do..While

Hi, I'm learning Javascript and I've come across this: var depositos=[]; var nro,monto; do { nro=prompt('Ingrese nro de cliente',''); nro=parseInt(nro) if (nro!=0) { monto=prompt('Ingrese monto a depositar','');...
asked by 26.04.2017 / 18:55