Q:

C Program to Print Even Numbers from 1 to N without If Statement

belongs to collection: C Programming on Numbers

0

C Program to Print Even Numbers from 1 to N without If Statement

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include<stdio.h>
int main()
{
    int i, number;
    printf("\n Please Enter the Maximum Limit Value : ");
    scanf("%d", &number);
    printf("\n Even Numbers between 1 and %d are : \n", number);
    for(i = 2; i <= number; i= i+2)
    {
        printf(" %d\t", i);
    }
    return 0;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Programming on Numbers

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
C Program to Print Even Numbers in a Given Range... >>
<< C Program to Print Even Numbers from 1 to N...