Questions tagged as 'while'

2
answers

How to insert an array into a variable?

Realizing that it has a lot of repetitive code I decided to automate it by creating a looping of reading the cells of my excel file. #row cell fixa para o horario rows = ts[1].rows cells = rows[1].cells #Segunda 7h40min - 8h30min cell = cells[...
asked by 01.04.2015 / 01:50
2
answers

how to select items in while counter, in php

I have created an admin page where I have entered the data for books in the database. I made this html where this data will be shown. the array will create this block "header" with all the books registered in the admin pages, but I would like to...
asked by 30.12.2017 / 23:38
3
answers

The same variable is repeated several times in the while

While words are appearing multiple times, eg: macarrão macarrão macarrão macarrão macarrão macarrão arroz arroz arroz arroz arroz arroz What am I doing wrong? <?php $usuario=$_SESSION['email']; require_once 'Classes/ProjetosVO.php';...
asked by 02.12.2017 / 05:03
2
answers

How to analyze the input in the while condition?

I'm learning C, and as the language in which I was "literate" is Python, I usually make associations to assimilate better. In Python, I can get a direct value in the while condition. Ex.: while int(input()) != 0: faça isso It is also...
asked by 24.12.2017 / 05:25
1
answer

Update variable within IF

Good morning, I'm not able to update a variable inside the IF structure and then use it in my code. Here is an excerpt from my code: while ($dado_participante = mysqli_fetch_array($qry2)) { //REGISTRO 0150: TABELA DE CADASTRO DO PA...
asked by 26.10.2017 / 15:34
1
answer

Python While Looping Help

I have tried several times, I can print the largest amount, I can print the date of the biggest sale, my problem is at the time of the tie, code follows the loop like this in command, only when he wants, help me, spent hours trying find the erro...
asked by 17.07.2017 / 07:15
1
answer

why does the loop while True access the if and the else in sequence to each complete loop in that code?

#! /usr/bin/python3 valor = int(input("Digite o valor a pagar: ")) cedulas = 0 atual = 50 apagar = valor while True: if atual <= apagar: apagar = apagar - atual cedulas += 1 else: print("%d cedula(s) de R$%d"...
asked by 28.03.2017 / 17:35
1
answer

Lock Prints [closed]

The program should: receive a 4-digit number, Increasing sorting and saving, Sorting in descending order and saving. Subtract from ascending to descending and save so that you can run the process from scratch until the subtraction equa...
asked by 20.11.2016 / 15:33
3
answers

Receive two positive numbers and repeat the interval between them with while?

How to make a JavaScript program that receives two positive numbers and repeats the interval between them using while ? var num1 = Number(window.prompt("Entre com primeiro numero")); var num2 = Number(window.prompt("Entre com segundo num...
asked by 25.09.2016 / 03:21
1
answer

Adding positives in an interval using just while

I need to write a program using a loop ( while ) that receives two numbers as input, and can be positive or negative and not necessarily in ascending order, and the program should print the sum of all positive numbers in that range. I star...
asked by 19.03.2016 / 15:26