how this program will execute print all the numbers from m to n and classiying them as a even or odd

#include<stdio.h>

include<conio.h>

int main()
{
int m,n,i;
printf("enter the value of m: ");
scanf("%d",&m);
printf("enter the value of n: ");
scanf("%d",&n);
for(i=m;i<=n;i++)
{
if(i%2==0)
printf("\n even number %d",i);
else
printf("\n odd number %d",i);
}

return 0;

}

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion