Questions tagged as 'while'

1
answer

How to create an Array with a While of the DB?

How are you? I'm trying to get help with the following > I have this Array: $ComprobanteItem_1 = array( "Cantidad" => 1, "Detalle" => "Producto Uno", "Codigo" => "CODPROD"...
asked by 01.10.2017 / 02:36
3
answers

Process character string with while loop

Someone could explain the logic of this exercise is not very clear to me It's about entering an email and checking if it has the "@" character mail=input("Ingrese un email") cantidad=0 x=0 while x<len(mail): #<-Esto no me queda claro...
asked by 01.05.2018 / 14:19
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
2
answers

What is the difference of While and Do While?

I wanted to know if you can give me a basic definition (I'm new to this, that's why I ask for a simple explanation: /) and not so complex of the while and do, especially of the while I have more doubts because I do not understand what it is what...
asked by 05.10.2018 / 22:25
2
answers

I want to be in a WHILE loop until I stop writing to a Char in C ++

I want to read a text infinitely until I stop writing, and count the vowels. But I stop writing and I do not leave the WHILE loop, why? Thanks for the help :) Here I leave the code: unsigned aCnt = 0, eCnt = 0, iCnt = 0, oCnt = 0, uCnt = 0; ch...
asked by 10.09.2018 / 13:39
2
answers

how do I get out of the if and return to the beginning of the loop?

enters the while loop, if I enter the correct value which in this case is 3, leaves the loop, but if not, I enter the if, and I do not leave there even if I enter the 3 again, how do I get out of the if and return to the beginning of the while?...
asked by 22.07.2017 / 06:17
1
answer

Why is not the System.out.println that is in the while printed on the console?

package Ejercicio15; public class AcumuladorInteractivo { private double nota; //GET AND SET public double getNota() { return nota; } public void setNota(double nota) { this.nota = nota; } //METODOS public double media(double nota) {...
asked by 15.11.2017 / 17:01
1
answer

Why does the operator cause problems when comparing two conditions in a do while in java?

For example: import java.util.Scanner; public class PruebaDeMetodos { static Scanner teclado ; public static void main(String[] args) { System.out.println("Escoje las opciones 'a' 'b' 'c':"); boolean anulado=false;...
asked by 14.07.2017 / 03:41
1
answer

how can I do for while to repeat the variable 'name' a certain number of times?

def fun (): re_ingresar = True num_nombres = int(input('cuantos nombres vas a escribir?')) while (re_ingresar): nombre = input('escribe un nombre:') #el output te repite 'escribe un nombre' infinidad de veces, #pero estoy trat...
asked by 05.11.2018 / 02:18