write a program to compare 2 numbers without using logical
operators?
Answer Posted / r.aruna
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
int b;
clrscr();
printf("enter the a value=");
scanf("%d",&a);
printf("enter the b value=");
scanf("%d",&b);
if(a==b)
{
printf("a is greater");
}
else
{
printf("b is greater");
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 15 No |
Post New Answer View All Answers
What is wrong with this program statement?
How do you generate random numbers in C?
Which header file is used for clrscr?
How can I determine whether a machines byte order is big-endian or little-endian?
What is the easiest sorting method to use?
Explain the bubble sort algorithm.
How can you draw circles in C?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
What is n in c?
What's the total generic pointer type?
What is the difference between malloc calloc and realloc in c?
What is the difference between a string and an array?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
how do you execute a c program in unix.
What is function prototype in c language?