User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:control_structures:while

while

    #include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
    while ( condition == true ) {
    do something until condition untrue
    }

C Sourcecode Example

#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
 
int main(void) {
    int i=0;
 
    while (i <= 10) {
        printf("%i\n",i);
        i++;
    }
    return 0;
}
  //output://
  
  0
  1
  2
  3
  4
  5
  6
  7
  ...
  up to 10

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/control_structures/while.txt · Last modified: 2024/02/16 01:04 (external edit)

Impressum Datenschutz