biggest of two no's with out using if condition statement
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / deepshree sinha
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,m;
printf('enter any two numbers");
scanf("%d %d",&a,&b);
m=(a>b)?a:b;
printf("m=%d",m);
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ramanjaneyareddy
#include<stdio.h>
main()
{int a,b,c;
scanf("%d%d",&a,&b);
c=(a>b)?a:b;
printf("%d",c);
return(0);
}
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / shafi.shaik
main()
{
int a,b;
a=10;
b=20;
clrscr();
if(a/b)
printf("A is Biggest");
if(b/a)
printf("B is Biggest");
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
What are dynamically linked and statically linked libraries?
how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
why in C,C++'s int size is 2 byte and .net(c#) int Size is 4 byte?
Explain is it valid to address one element beyond the end of an array?
What is typedef example?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
hi how to convert program from notepad to turboc editor can u please help me
What is this pointer in c plus plus?
void main() { int i=5; printf("%d",i+++++i); }
What are header files and what are its uses in C programming?
what is bit rate & baud rate? plz give wave forms