คำสั่งควบคุมลำดับการทำงาน while
รูปแบบ
while (เงื่อนไข)
{
    คำสั่ง 1;
    คำสั่ง 2;
     ...;
}
ตัวอย่าง Flowchart การทำงาน
ตัวอย่าง source code จาก flowchart
#include  <stdio.h>
#include  <conio.h>
#include  <graphics.h>
void main()
{
     clrscr();
     int i=0;
     int gdriver = DETECT, gmode, errorcode;
     initgraph(&gdriver, &gmode, "c:/tc/bgi/");
     while (i<200)
     {
         circle(200,200,i);
         i=i+50;
     }
     getch();
     closegraph();
}
กลับหน้าหลัก |