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

Explain about C function prototype?

597


Why is c so important?

590


What is strcpy() function?

650


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

689


What is difference between union All statement and Union?

626






What is assignment operator?

620


a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

619


how could explain about job profile

1446


Explain why C language is procedural?

766


Can you apply link and association interchangeably?

663


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1501


What is assert and when would I use it?

573


Explain what are bus errors, memory faults, and core dumps?

782


Can we replace the struct function in tree syntax with a union?

770


What is boolean in c?

601