Answer Posted / santhi perumal
#include<stdio.h>
#include<conio.h>
//To calculate a-b
void main()
{
int a,b,min,max;
printf("Enter the value of a and b \n");
scanf("%d %d",&a,&b);
min = (a<b)?a:b;
max = (a>b)?a:b;
while(min--) max--;
if(a<b)
printf("-%d",max);
else
printf("%d",max);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Which function in C can be used to append a string to another string?
What is conio h in c?
Difference between strcpy() and memcpy() function?
Explain 'bit masking'?
Explain modulus operator. What are the restrictions of a modulus operator?
Explain how do you determine a file’s attributes?
I have a varargs function which accepts a float parameter?
What is self-referential structure in c programming?
c program for searching a student details among 10 student details
Is c programming hard?
why programs in c are running with out #include
What does it mean when the linker says that _end is undefined?
Who invented b language?
What is the best way to store flag values in a program?
why we wont use '&' sing in aceesing the string using scanf