Program to find larger of the two numbers without using if-else,while,for,switch
Answer Posted / nidhish mathew
#include<stdio.h>
#include<math.h>
int main()
{
int i,j;
scanf("%d%d",&a,&b);
printf("Greater Number is %d",(a+b+abs(a-b))/2);
printf("Smallest Number is %d",(a+b-abs(a-b))/2);
}
Is This Answer Correct ? | 16 Yes | 8 No |
Post New Answer View All Answers
how many errors in c explain deply
State two uses of pointers in C?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
Can a file other than a .h file be included with #include?
What is the difference between class and object in c?
What is modeling?
What is getch c?
What is extern variable in c with example?
Explain the term printf() and scanf() used in c language?
What is a union?
What is array of structure in c programming?
program for reversing a selected line word by word when multiple lines are given without using strrev
Who invented bcpl language?
Is null equal to 0 in sql?
Is array name a pointer?