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
Explain what is wrong with this statement? Myname = ?robin?;
List the difference between a While & Do While loops?
What is pointer in c?
simple program of graphics and their output display
Implement bit Array in C.
How are strings stored in c?
How the c program is executed?
What are reserved words with a programming language?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
What is the difference between array and pointer in c?
how to count no of words,characters,lines in a paragraph.
Write a code to generate divisors of an integer?
What is use of bit field?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Explain how can I write functions that take a variable number of arguments?