You are viewing a single comment's thread. Return to all comments →
int main() { int x,y; float m,n; scanf("%d %d",&x,&y); scanf("%f %f",&m,&n); if(x>=1 && x<=10000 && y>=1 && y<=10000 && m>=1 && m<= 10000 && n>= 1 && n<=10000) { printf("%d %d\n",x+y,x-y); printf("%.1f %.1f",m+n,m-n); } else { return 0; } return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sum and Difference of Two Numbers
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
int main() { int x,y; float m,n; scanf("%d %d",&x,&y); scanf("%f %f",&m,&n); if(x>=1 && x<=10000 && y>=1 && y<=10000 && m>=1 && m<= 10000 && n>= 1 && n<=10000) { printf("%d %d\n",x+y,x-y); printf("%.1f %.1f",m+n,m-n); } else { return 0; } return 0; }