/* This program displays the numbers from 1 to 50 which are divisible by 2 */ #include <stdio.h> int main() { int i; printf("The numbers from 1 to 50 which are divisible by 2 are given below\n"); for (i=1 ; i<=50 ; i++) { if (i % 2 == 0) { printf("%d\n", i); } } return 0; }
Comments
Post a Comment