66 : C Program to print even numbers 2 4 6 8 10 ...

Check out the complete list of c-programs : C Program List    





This program prints out even numbers between 1 to 20.

Logic :

  for ( i = 1 ; i < 20 ; i++ )
   {
      i = i+1;
      printf("%d  ", i);
     
   }










/*
 * 1000+ C programs + tutorials
 *
 * 
 * 66_c_program_to_print_even_numbers_2_4_6_8_10_12.c
 *  
 *  
 *
 *  Created on: Oct 25, 2014
 *  Author: Code2care.org
 */

#include <stdio.h>
//#include <conio.h>

void main() {


//clrscr();

int i;
 
 
   printf("\nC program to print Even numbers : ");
 
   for ( i = 1 ; i < 20 ; i++ )
   {
      i = i+1;
      printf("%d  ", i);
     
   }

 //	getch(); 

}









The best way to learn C programming is to practice more and more of programs . Code2care C Programming tutorials provide 1000+ programs in C that you can study and become an expert in the language. Programs are divided into categories depending upon type and complexity.

BSc. IT, BSc. Computer Science, BSc. IT, MSc. IT, MSc. Computer Science, MCA, BTech IT & BTech Engineers may find these programs very useful.