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
FILE PROGRAMMING
Implement bit Array in C.
What the advantages of using Unions?
Explain what is the benefit of using enum to declare a constant?
What is register variable in c language?
How #define works?
Is a pointer a kind of array?
What is the scope of an external variable in c?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
Difference between exit() and _exit() function?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
Explain how can I read and write comma-delimited text?
How does free() know explain how much memory to release?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
What is else if ladder?