biggest of two no's with out using if condition statement
Answer Posted / sarvanm
#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 ? | 15 Yes | 1 No |
Post New Answer View All Answers
What is a stream water?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What is the use of function overloading in C?
What is the difference between array_name and &array_name?
Explain what are the __date__ and __time__ preprocessor commands?
What is the translation phases used in c language?
How to Throw some light on the splay trees?
What is the difference between void main and main in c?
The difference between printf and fprintf is ?
Explain can you assign a different address to an array tag?
Explain how are portions of a program disabled in demo versions?
Can you write the algorithm for Queue?
Explain Basic concepts of C language?
how many key words availabel in c a) 28 b) 31 c) 32
How are strings stored in c?