Aug 19, 2019

EVEN OR ODD NUMBER PROGRAM

                                         
even or odd computer program,even or odd C++ program
even or odd computer program

EVEN OR ODD NUMBER

Program number# 4
            Program which determine even or odd number
Program:

void main (void)
int num, mod;
prnitf(“enter a number”);
scanf(“%d”, &num);
mod=num%2;
if(mod ==0 )
printf(“the entered number is even ”);
else if(mod==1)
printf(“the entered number is odd”);
else
printf(“the entered is invalid”);
}

0 comments:

Post a Comment

Please do not enter any spam link in the comment box