C program to check whether a given number is even or odd? if the number is even number, print it's square...
#include<stdio.h>
#include<conio.h>
void main()
{
int num, squ;
printf("enter number = ");
scanf("%d",& num);
if(num%2==0)
{
printf("The number is Even");
squ = num*num;
printf("\nsquare of this even number is %d", squ);
}
else
printf("The number is Odd");
getch();
}
Output:
Click Here for, All Important Questions with Answers
Click here for, C Programs
Great blog very simple and easy to understand for beginners.Programs are written in such a way that any one can easily understand it. Good work
ReplyDelete