C program to print even numbers between given two numbers.
This blog has been migrated to learn c programming for beginners
Write a C program print even numbers between given two numbers.
This C program prints the even number between the two number supplied by userC Program source code
#include<stdio.h> #include<conio.h> int main() { int i,n1,n2; printf("Enter any two numbers:\n"); scanf("%d%d",&n1,&n2); for(i=n1;i<=n2;i++) { if(i%2==0) { printf("%d\t",i); } } printf("\nThese are the even numbers between those two numbers."); getch(); return(0); }You can Browse related article below for more information and program code related to different math operation. Does above is helpful , Post you views in comment
Comments
Post a Comment