biggest of two no's with out using if condition statement
Answer Posted / saravanan marimuthuraja
#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 ? | 4 Yes | 4 No |
Post New Answer View All Answers
How do you define a string?
What are two dimensional arrays alternatively called as?
What is c method?
How can you invoke another program from within a C program?
What is typedf?
What is the difference between %d and %i?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is void main ()?
What is register variable in c language?
What is C language ?
What is double pointer?
What is the difference between union and structure in c?
How pointers are declared?
What is a void pointer? When is a void pointer used?