Program to find larger of the two numbers without using if-else,while,for,switch
Answer Posted / nidhish mathew
#include<stdio.h>
#include<math.h>
int main()
{
int i,j;
scanf("%d%d",&a,&b);
printf("Greater Number is %d",(a+b+abs(a-b))/2);
printf("Smallest Number is %d",(a+b-abs(a-b))/2);
}
Is This Answer Correct ? | 16 Yes | 8 No |
Post New Answer View All Answers
What is main function in c?
How can I swap two values without using a temporary?
What are data structures in c and how to use them?
Can a pointer be static?
How is pointer initialized in c?
Explain pointers in c programming?
Multiply an Integer Number by 2 Without Using Multiplication Operator
How can a process change an environment variable in its caller?
Define the scope of static variables.
what do you mean by inline function in C?
How many types of operator or there in c?
Write a program to print “hello world” without using semicolon?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..