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
Write a program to show the change in position of a cursor using c
What is the mean of function?
Are enumerations really portable?
Explain how can I avoid the abort, retry, fail messages?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
What are conditional operators in C?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is register variable in c language?
Write a program to generate random numbers in c?
How can I read and write comma-delimited text?
What is the difference between procedural and declarative language?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
please explain every phase in the "SDLC" in the dotnet.
Is Exception handling possible in c language?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.