Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript Site
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


While loop
 

 

 

Description

An example of using a while loop

Code

/*while example*/

#include<stdio.h>

int main(void)
{

const int SECRET_CODE = 15;
int code;

printf("Type the secret number to enter.\n");
scanf("%d", &code);

while(code != SECRET_CODE)
{
printf("Type the secret number to enter.\n");
scanf("%d", &code);
}
printf("Well done , you can now enter.\n");

return 0;
}

Information

tested using Visual C++ 6 , LCC Win 32

 

 

 

 

Download

while1.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
random circles(Darkbasic)
php and java example(PHP)
Admin rights for Windows(VB)
3d text effects(Javascript)
Odd or even(C)
Bubblesort routine(PHP)
download a file from the internet(VB)
check if a file exists(C Sharp)

    




Copyright © 2003 by programmershelp.co.uk