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
Here is a good puzzle: how do you write a program which produces its own source code as output?
When should you not use a type cast?
What is data structure in c language?
plz let me know how to become a telecom protocol tester. thank you.
Explain how do you search data in a data file using random access method?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Why should I use standard library functions instead of writing my own?
How we can insert comments in a c program?
What is meant by preprocessor in c?
Do you know what are bitwise shift operators in c programming?
Write a program to implement queue.
What are the functions to open and close file in c language?
what is the structure pointer?
Write a program to check palindrome number in c programming?