C

Friday, 18 August 2017

Program To Perform Logical Operator

#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c;
clrscr();
printf("Enter the value of a,b and c\n");
scanf("%d%d%d",&a,&b,&c);
if((a>b)&&(b>c))
printf("\na is greater than b =%d",a);
else
printf("\nb is greater than a =%d",b);
if(a>c)
printf("\na is greater value than c =%d",a);
else
printf("\nc is greater value than a =%d",c);
if((a==b)||(a==c))
printf("\na value is equal to b");
else
printf("\nvalues are not equal");
getch();
}                 

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) {         ...