Created
April 29, 2021 08:35
-
-
Save btechmag/b3aab9a910ced35232dc254f909fd698 to your computer and use it in GitHub Desktop.
C Program that prints all even numbers between 1 and 50.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
//Program that prints all even numbers between 1 and 50 | |
int i; | |
printf("The even numbers between 1 to 50 are: \n"); | |
for(i = 1; i <= 50; i++) | |
{ | |
if(i % 2 == 0) | |
{ | |
printf("%d ",i); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment