C

Monday, 28 August 2017

Program To Check Whether A Number is Odd or Even.

#include<stdio.h>
void main()
{
int n;
clrscr();
printf("Enter the integer value\n");
scanf("%d",&n);
if(n%2==0)
printf("The value is even");
else
printf("The value is odd");
}

No comments:

Post a Comment

Write a program to draw a circle using mid-point circle drawing algorithm.

#include<iostream.h> #include<graphics.h> #include<conio.h> void drawcircle(int x0, int y0, int r) {         ...