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
How many loops are there in c?
How are pointers declared in c?
Are the variables argc and argv are always local to main?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
can anyone please tell about the nested interrupts?
What is the use of ?
Tell me when is a void pointer used?
Why do we use main function?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
What is far pointer in c?
What is the equivalent code of the following statement in WHILE LOOP format?
develop algorithms to add polynomials (i) in one variable
Why are all header files not declared in every c program?
How do we make a global variable accessible across files? Explain the extern keyword?