C examples for Statement:while
Print the numbers 1 through 20 in a simple while statement
#include <stdio.h> int main( void ){ int count = 1; while (count <= 20) {/* w ww .ja va 2s . co m*/ printf("%d\n", count); count++; } return 0; }