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 is hashing in c?
What are the different types of control structures?
x=y=z=1 z=++x||++y&&++z Printf("%%%d";xyz) what is the values of x,y and z?????
Are pointers really faster than arrays?
Differentiate between null and void pointers.
What does d mean?
What is the output of the program #include<stdio.h> #include<conio.h> void main() {0 int i,j=20; clrscr(); for(i=1;i<3;i++) { printf("%d,",i); continue; printf("%d",j); break; } getch(); }
being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry?
how can we use static and extern?and where can we use this?
What is difference between class and structure?
Tell me what is the purpose of 'register' keyword in c language?
difference between native and cross compilers