GoConqr has a new look! Let us know what you think.

Notes

Estructura repetitiva while ()

gloria sánchez Programación Básica Mapa Spanish 1 page

Content of the notes (1)

Page 1

El ciclo while ( ) se puede utilizar de dos formas muy prácticas:

cuando necesitamos que se repita un proceso un número determinado de veces

cuando la decisión de repetición, la tiene el usuario.

Por ejemplo:

#include<stdio.h> void estados() {

char estado[30];

int x;

printf("Programa que solicita nombres de estados \n");

x=5;

while ( x<=10){

printf("Escribe el nombre del estado %i: \n", x);

scanf("%s", estado);

x++;

}

}

int main(){

estados();

}

---------------

Otro ejemplo, cuando el usuario decide....

Estructura repetitiva while ()

Estructura repetitiva while ()

Information

Description
Estructura repetitiva while ()
Created by
gloria sánchez · Sep 2016
Updated
Oct 22, 2016
Views
169
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?