/* 0909.c */ #include <stdio.h> int main() { int count; count=0; while(1) /* selalu benar */ { printf("%d, ", count); count=count+1; if(count>20) break; /* buat exit loop */ } putchar('\n'); return(0); }
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, Process returned 0 (0x0) execution time : 0.011 s Press any key to continue.
Tidak ada komentar:
Posting Komentar