First 50 even natural number || for loop || C programming
 In this, we are going to see for loop, the program is based on for loop which basically, prints even number from 1 to 50 with the help of the C Programming language. 


#include <stdio.h>
int main()
{
    int i, n;
    n = 50;
    printf("Even numbers from 1 to 50 are:-\n");

    for (i = 1; i <= n; i++)
    {
        if (i % 2 == 0)
        {
            printf("%d\n", i);
        }
    }

    return 0;
}

//......Coded by YASH ALAPURIA

#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post