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


Please Help Members By Posting Answers For Below Questions

What is c language & why it is used?

590


Differentiate between null and void pointers.

641


What does the message "automatic aggregate intialization is an ansi feature" mean?

704


Why structure is used in c?

608


Difference between Shallow copy and Deep copy?

1584






can we change the default calling convention in c if yes than how.........?

2043


What does it mean when the linker says that _end is undefined?

648


How many data structures are there in c?

625


What is local and global variable in c?

627


What are control structures? What are the different types?

610


What is the advantage of using #define to declare a constant?

629


Is c is a low level language?

574


What is time null in c?

591


Are pointers integers in c?

619


What are qualifiers and modifiers c?

561