Questions tagged as 'bucles'

2
answers

Problem with the while loop in JAva

I try to execute a very simple code, I simply want the program to ask the user to enter their hobbies until the user enters 'done'. Then, the program goes to the next part. The problem appears when I enter 'done' but the loop continues. import...
asked by 17.07.2018 / 18:32
1
answer

JAVA - Netbeans - FOR Cycle

I'm starting in java language, with netbeans. I do some exercises, I just can not understand how the next cycle works: if (num<=1){ return false; }else{ int prueba; int contador=0; prueba=(int)Ma...
asked by 08.12.2018 / 17:28
1
answer

Restart in cycle for

I am doing a program which reads a file (which contains in lines words, is attached) and has to return a new file with the word in question and the sum of its characters (these I generated from a dictionary ). The problem is that it does everyth...
asked by 19.11.2018 / 20:51
2
answers

Repair infinite while loop

I have this program to solve within the resolution I have a loop while infinite and I do not know how to put it, because if I use a break I leave the funcion and I can not continue entering data to my program. It has to b...
asked by 18.05.2018 / 07:35
2
answers

problem with infinite loop

I need to do a program that asks for the sex and age of a number of people (it is supposed to end by putting 'n' in sex) ... and then says how many women and men attended ... in addition to intervals of age (how many men and women of certain age...
asked by 20.05.2018 / 22:42
0
answers

help with accumulator pattern python 3, my output is not what I wanted? [closed]

suma=0 for ex in range (1, 11): nuevo_balance=300 suma += nuevo_balance print ('persona numero',ex,'tiene',nuevo_balance ,'$' ) What I want is that in the output person 1 have 300 and the second 600 and the third 900 and so on. OU...
asked by 04.10.2018 / 05:32
0
answers

How do I extract values from one data frame to another data frame using loops and conditions?

I want to create a data frame by extracting certain values from another data frame, for what I did was create 2 matrices de 875 obs and% loop with certain conditions: Finally, what I want is to extract the value of variable X2 when...
asked by 22.08.2018 / 04:52
2
answers

How to get out of a loop with a counter in Java?

I have made a small program in which a password must be entered and if it reaches a maximum of three failed attempts, the program ends without further ado. My problem is that with my current code I can not get anywhere, the loop repeats infinite...
asked by 14.12.2018 / 20:37
0
answers

In variable, assign value, change it in one function and pass the changed value to another

I'll get to the point; I'm doing something like this: public class clase{//clase principal int valor;//variable global if (post.containsKey("xempieza")) { if(valida()){ bit.bitHtml = recibedato(); //bit.bitHtml obtien...
asked by 18.04.2018 / 18:21
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