# Questions tagged as 'while'

5

## Simple solution for Fibonacci algorithm

I have this statement in hand:    Given the Fibonacci sequence 1 1 2 3 5 8 13 ... n, write an algorithm to generate the sequence up to the nth term, which should be provided by the user. For example, if the user entered the number 40, 40 numb...
2

## Subtraction of arrays

I have two arrays : A E B A = [1,2,3...] B = [7,5,1...] When I do this subtraction it has the correct subtraction return: console.log(A[0] - B[0]); But when I play in the loop it does not work: while (i = 0) { A[i] - B[i] }    ...
3

## Function prints list while

How do I do this with the loop while ? void imprime(lista* recebida){ lista* aux; for(aux=recebida; aux!=NULL; aux=aux->prox){ printf("Informacao %d\n",aux->info); } }
1

## How do I stop organizing the table in while?

How do I stop organizing this table? Sum, subtraction and multiplication respectively? #include <stdio.h> int main (){ int i=0, num=0; printf ("Digite um n£mero: "); scanf ("%d",&num); printf ("\n"); while (i<=9){ i++;...
2

## Do While goes into infinite loop

I'm sure my error is in while , but I can not understand what I did wrong. It enters loop infinity. The statement follows:    Implement a program that receives 3 arguments from the command line. O   first and second argument are re...
1

## do the multiplication of values using soma and while operator

var n1 = Number(window.prompt(" digite o primeiro número ")); var n2 = Number(window.prompt(" digite o segundo número ")); var soma; var num = 0; while( num < n1) { var num = n1+n2+n1; num++;...
2

## Question using while

I'm new to java and would like some help from you, my code is correct following the exercise I'm doing, but I want to increment it using while to ask the user if he wants to repeat the process of the questions ... but my code is not working ......
2

## Listing images within a directory

I want to list the images in a directory, but I can not. You are listing the right amount and everything, but the images do not appear. <?php \$path = "http://www.imaginew.com.br/administrar/foto_portifolio/galeria/"; \$diretorio = di...
1