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 are the different types of constants?
What does 2n 4c mean?
What is string concatenation in c?
Why is c faster?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
write a program to display all prime numbers
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
Why is C language being considered a middle level language?
What do the functions atoi(), itoa() and gcvt() do?
What are types of functions?
What is difference between && and & in c?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Explain how can I pad a string to a known length?
Why we use conio h in c?
What is the difference between if else and switchstatement