C Programming Tutorial - for Loop





#include<stdio.h>

int main() {
  int apple;
  
  for(apple =1; apple<=10; apple++)(three different piece of information inside the parenthesis)
      printf("Apple is %d \n", apple); 
      
  }
      return 0;
     
}



#include<stdio.h>

int main() {
  int apple;
  
  for(apple =0; apple<=100; apple+=8) { 
      printf("Apple is %d \n", apple); 
      
  }
      return 0;
     
}

Comments