Sunday 1 November 2015

write a program to check the number is odd or even in c language.

write a program to check the number is odd or even in c language. #include<stdio.h> #include<conio.h> Void main( ) { ... thumbnail 1 summary

write a program to check the number is odd or even in c language.


#include<stdio.h>
#include<conio.h>
Void main( )
{
            Int n;
            Printf(“enter an integer \n”);
            Scanf(“%d”,&n);
            If(n%2==0)
            {
                        Printf(“even\n);
            }
            Else
            {
            Printf(“odd\n”);
            }
}

No comments

Post a Comment