Questions tagged as 'loop'

1
answer

Why do not you enter the notes loop?

I am storing student names and notes and trying to display the name, grade, and grade. The problem is that the program is jumping the notes loop and is just picking up the name. #include <stdio.h> #include <stdlib.h> #include <s...
asked by 19.09.2018 / 21:20
1
answer

A solution to break / continue a loop in Python?

The question is this, I can not find a solution that will override console usage for my small application. What happens is: My application runs in the eternal loop, but after it executes the loop, it should stop to ask if I want to stop the l...
asked by 27.04.2018 / 06:53
2
answers

Put two Arrays inside a foreach [closed]

Well, in the case I have two arrays that are received from inputs, based on hotel room rentals, in case each room needs to display Number of adults and children, I got someone's help here on the stack to increase the number of rooms, but I had t...
asked by 19.09.2017 / 03:44
3
answers

PHP- Table with repetitions in loops using multidimensional array

Hello, I need to make a table like the but using this array: $teste = array(); $teste[0]['produtos']['nome'] = "Produto 1"; $teste[0]['produtos']['descricao'] = "Descrição do produto 1"; $teste[0]['produtos']['valor'] = 50; $teste[0]['produ...
asked by 04.10.2017 / 03:15
2
answers

How do I add spaces before a number?

I'm trying to add spaces before numbers. The first code worked fine, but I wanted to do it in the form of loop . Sub numeros() numero = Range("A2").Value n = 3 If Len(Range("A" & n).Value) = 3 Then numero = Range("A" & n)...
asked by 09.06.2017 / 02:58
2
answers

How to rescue lots of variables sent by POST and use them?

I'm having a problem rescuing large amounts of variables sent by the $_POST method. I was using this code earlier:    import_request_variables ("gp", "rvar _"); But it was discontinued and my script stopped working, I tried to loop...
asked by 02.06.2017 / 14:04
2
answers

Calculation of the smallest divisible number giving infinite loop in C

I made a program in C to solve the following exercise: Code:#include"stdio.h" #include "stdlib.h" int main(int argc, char const *argv[]) { int num = 0; int count = 20; int contaDivisores = 0; for(int i = 1; i <= count; i++){ for(in...
asked by 20.04.2017 / 00:44
1
answer

How to show 5 in 5 hidden elements?

I've recently been hit with a question, for which I have to manipulate a number of elements hidden through display:none; which is set on the span that surrounds all of them. Example <html> <head> <sc...
asked by 15.02.2017 / 23:06
1
answer

Loop Javascript - 1 + input

Good evening, everyone! I'm stuck in a Javascript loop, it's the following: User types any positive number, example 15. I need to make the number 1 up to 15 available on the console. The problem is that I do not know how to increment...
asked by 27.01.2017 / 07:51
1
answer

Program to calculate media

#include <stdio.h> #include <stdlib.h> int main() { int sum = 0; int times = 0; int number; int average; while ( number != 9999 ){ printf( " Type the number and i will make the average, 9999 to end:\n "...
asked by 07.12.2016 / 02:29