Questions tagged as 'while'

1
answer

Adding value in the picturebox

I'd like to know if you have any way to make it work here int chck = 0; int fid = 0; while (chck < 150) { try { sqlcon.Open(); string sql2 = "SELECT img FROM clienteimg...
asked by 05.02.2018 / 03:18
2
answers

Problem sending input value (which is updated in a While) to another page via POST

I have a% re loop of% that creates fields according to the number of client counties. I need to pass the while variable via POST method to be inserted in the Database on another page. In case you have only one municipality, POST wor...
asked by 13.12.2017 / 14:26
1
answer

Prevent the repetition of an element in a part of the code

I have the following exercise that asks me to define a range and sum all the even values of that range showing which numbers added together, of the sort:    Min = 10   Max = 15       10 + 12 + 14 = 36. However. the output I get is:  ...
asked by 30.10.2017 / 15:09
1
answer

MySQL connection lost in While PHP [closed]

I make a query via ajax, but your return is: mysqli_query(): MySQL server has gone away in mysqli_query(): Error reading result set's header in mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given I've added it...
asked by 04.12.2017 / 15:08
2
answers

End loop when an entry is empty

I have the following situation: A repeat loop that asks for a name, and 2 notes, where the data entry should finish when you read an empty name, but the way below the second time the program runs the name is not asked, any tips on how to do? n...
asked by 24.09.2017 / 17:58
1
answer

How to open different web pages using the while

I would like the program to execute a command three times: wait 10 seconds to open a web page. For this to occur, set the following code: import time import webbrowser total_breaks = 3 break_count = 0 while(break_count < total_breaks):...
asked by 26.09.2017 / 21:11
2
answers

Algorithm that reads three numbers and displays the result of the sum of the first two and multiplied by the third

public class Exercicio2 { @SuppressWarnings("unused") public static void main(String[] args) { Scanner entrada = new Scanner(System.in); int i = 0; int[] soma = new int[3]; int numero1, numero2 = 0; int total = 0;...
asked by 05.09.2017 / 10:16
1
answer

Use php to set the column width depending on the result of the while

I have the following code $result_categorias = "SELECT * FROM categorias ORDER BY ordem ASC"; $resultado_categorias = mysqli_query($conn, $result_categorias); $total_categorias = mysqli_num_rows($resultado_categorias); $quantidade_pg = 3; <...
asked by 13.06.2017 / 14:48
1
answer

Write the average of the numbers entered, if they are even. End the reading when the user enters zero (0)

Ex) Write an algorithm that calculates the average of the numbers entered by the user, if they are even. Finish reading if the user types zero. I did so: public static void main(String[] args){ Scanner x = new Scanner (System.in);...
asked by 04.06.2017 / 20:10
1
answer

While Exercising for Proof

I can not do this exercise, neither with while nor with for. If you can give me the way you do with While and For, I'll be grateful.    Given a list of numbers, say the largest number on the list. Use the len () function to find out the list...
asked by 24.05.2017 / 19:19