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
What are register variables? What are the advantage of using register variables?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What is variable declaration and definition in c?
main() { printf("hello"); fork(); }
What is exit() function?
Why clrscr is used in c?
What is the difference between %d and %i?
What does %c do in c?
What is static volatile in c?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
Where are local variables stored in c?
What is c basic?
Simplify the program segment if X = B then C ← true else C ← false
Can we declare variables anywhere in c?
What are structure members?