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 the size of enum in bytes?
what is the structure pointer?
What are the valid places to have keyword “break”?
What is c variable?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
What is the use of volatile?
What language is c written?
show how link list can be used to repersent the following polynomial i) 5x+2
How can you find out how much memory is available?
What header files do I need in order to define the standard library functions I use?
What is infinite loop?
How can I call fortran?
What are the data types present in c?
Can we replace the struct function in tree syntax with a union?
What is typedef?