Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

sum and difference code

–1 vote
asked Aug 6, 2019 by SAIKUMAR REDDY (110 points) 1 flag

2 Answers

0 votes
answered Aug 9, 2019 by Loki (1,600 points)
Could you please explain a little what you would like to do?
0 votes
answered Aug 12, 2019 by DebasmitBiswal (140 points)
/**********IN C**********/

#include<stdio.h>

int main()

{

int x,y,sum,difference;

printf("Enter values for x,y\n");

scanf("%d %d",&x,&y);

sum=x+y;

if(x>y)

{

difference=x-y;

}

else

{

difference=y-x;

}

printf("sum=%d\tdifference=%d",sum,difference);

return 0;

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...