biggest of two no's with out using if condition statement
Answer Posted / saravanan marimuthuraja
#include <stdio.h>
#include <math.h>
void main()
{
int m1,m2,a,b;
clrscr();
printf("Enter the First Number\n");
scanf("%d",&a);
printf("Enter the Second Number\n");
scanf("%d",&b);
m1=abs((a+b)/2);
m2=abs((a-b)/2);
printf("The Bigest No is==%d\n",m1+m2);
printf("The Smallest No is==%d\n",m1-m2);
}
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
Explain bitwise shift operators?
Explain the properties of union.
What is an expression?
Where are local variables stored in c?
Can a pointer be volatile in c?
What are the different types of endless loops?
Explain how can I read and write comma-delimited text?
Are enumerations really portable?
why do some people write if(0 == x) instead of if(x == 0)?
How can I swap two values without using a temporary?
Explain is it valid to address one element beyond the end of an array?
What is external variable in c?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What is the difference between āgā and āgā in C?
string reverse using recursion