Display even numbers from 1 to 'n' By Nithin May 09, 2019 #include <stdio.h> int main() { int n; printf("Enter the value of n : "); scanf("%d" , &n ); printf("\n"); for(int i = 1 ; i <= n; i++ ) { if(i % 2 == 0) printf("%d " , i ); } } Link : https://repl.it/@nithin_gudla/evennumbers Share Get link Facebook X Pinterest Email Other Apps Share Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment