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 ? | 9 Yes | 2 No |
Post New Answer View All Answers
Explain the difference between exit() and _exit() function?
What is the difference between far and near in c?
What is the meaning of 2d in c?
How can I pad a string to a known length?
What is else if ladder?
How old is c programming language?
What is %s and %d in c?
write a programming in c to find the sum of all elements in an array through function.
How can I read data from data files with particular formats?
What is the size of structure in c?
How can my program discover the complete pathname to the executable from which it was invoked?
What are the key features in c programming language?
What do you mean by scope of a variable in c?
What are the features of the c language?
Compare interpreters and compilers.