biggest of two no's with out using if condition statement
Answer Posted / 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 |
Post New Answer View All Answers
What does #pragma once mean?
What is null pointer in c?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What are bitwise shift operators in c programming?
What is the code for 3 questions and answer check in VisualBasic.Net?
Describe the difference between = and == symbols in c programming?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
please give me some tips for the placement in the TCS.
Explain what are linked list?
Explain the difference between #include "..." And #include <...> In c?
What are examples of structures?
What is context in c?
Compare interpreters and compilers.
What is pivot in c?
What is linear search?