Follow This Blog For more... 😊

Program to print first n even numbers.| Using C language| C Program series 16|

👨‍💻Program to print first n even numbers.

Code:


    //Program to print first n even numbers.
   
    #include<stdio.h>
    main()
    {
        printf("Program to print first n even numbers.\n\n");
       
        int i=2,n,count;
       
        printf("Enter the value of n:");
        scanf("%d",&n);
       
        for(count=1; count<=n; i=i+2,count++)
        {
            printf("%d ",i);
        }
    }

Output:





👉Click for more C Program series Questions.[Questions list]

Comments

Popular Posts