Questions tagged as 'while'

1
answer

What is the error in the while loop? moon language

What is the error in the loop? I wrote this code to print the sum of the first 10 prime numbers, I already checked the loops but could not find the error. It was to print the sum of the cousins until 29 but only printed 2. Vlwzao o / n=2 cont=...
asked by 29.11.2016 / 01:41
1
answer

Help with PHP Replication Structure - PARSER - simple_html_dom.php

I am making a parser with simple_html_dom.php where I pull all the links of a certain page. I can pull the links and assign to an array, then the problem comes up: This page has a maximum display limit of 36 items per page. items i...
asked by 19.05.2015 / 15:39
1
answer

Google Chart's Line with While

Good afternoon,  I have the following query: SELECT DATE(o.data_fechamento) AS Data, u.nome AS Pessoa, COUNT(*) AS Total FROM ocorrencias AS o LEFT JOIN sistemas AS a ON a.sis_id = o.sistema LEFT JOIN localizacao AS l...
asked by 04.04.2017 / 20:55
3
answers

How does the variable p work in this code?

I do not know how the variable p of the loop while is working on this code. If the variable p is the iteration variable, why does the exercise also use a p variable within while to store s.find( "tigre"...
asked by 05.05.2017 / 21:28
2
answers

Program always returns the same result in C

The code runs normal but only one output: Sunday ! regardless of the number chosen. What the program should do Implement a program that has a number ( 1-7 ) that corresponds to one of the days of the week and print the name of the corresp...
asked by 11.03.2015 / 04:32
4
answers

Next record. PHP + Mysql

I'm a beginner in programming and would like to know how I would make my $ id = 1 , turn 2, 3 and so on. The code at the end means that it needs to compare that value and only then $id++ occurs. I know I need to insert within while...
asked by 12.08.2015 / 00:22
3
answers

Javascript function does not respect loop conditions

Good afternoon, I'm new here and I'm using Mozilla Firefox JavaScript Scratchpad to run Javascript tags. It will really suit my needs, however the while loop condition of the while loop is not working (for also did not work). Also, the varia...
asked by 23.10.2015 / 20:25
3
answers

How the end-of-file loop is made

Type, I know that the function feof () returns 0 if it did not find an end of file and that it requires 1 parameter, which is the variable_pile_pile_FILE pointer, so far so good. If I do the while so it works like neither of the below but I d...
asked by 19.06.2015 / 16:48
1
answer

Eliminate code redundancy in a while loop

In this example: . Ask for today's date via a form. . Check if it was typed in dd / mm / yyyy format. . Compare with the current system date from datetime import date def verificacaoData(): dataForm = input('Digite a data atual no pad...
asked by 21.11.2017 / 16:28
4
answers

Locking in the While Program

I'm working on a project and I'm having problems with it, this program I'm posting is similar to what I'm working on. The problem is this: it arrives at while , the program does its job, then hangs up and does not exit. I have tried...
asked by 19.10.2014 / 19:54