Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

while loop C

// Print numbers from 1 to 5

#include <stdio.h>
int main() {
  int i = 1;
    
  while (i <= 5) {
    printf("%d
", i);
    ++i;
  }

  return 0;
}
Source by beginnersbook.com #
 
PREVIOUS NEXT
Tagged: #loop #C
ADD COMMENT
Topic
Name
6+3 =