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 would be an example of a structure analogous to structure c?
What is the purpose of 'register' keyword in c language?
What are the Advantages of using macro
Explain how can I remove the trailing spaces from a string?
What is #ifdef ? What is its application?
What is uint8 in c?
Is null always equal to 0(zero)?
Tell me the use of bit field in c language?
What are the differences between Structures and Arrays?
What are the advantages and disadvantages of pointers?
What is the auto keyword good for?
How to write a code for reverse of string without using string functions?
Explain how can you restore a redirected standard stream?
Do pointers need to be initialized?
How can I delete a file?