We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Sum and Difference of Two Numbers
Sum and Difference of Two Numbers
Sort by
recency
|
595 Discussions
|
Please Login in order to post a comment
include
include
include
include
int main() { int a,b; float c,d;
}
include
int main() { int a, b; float c, d, e, f; scanf("%d%d%f%f", &a, &b, &c, &d); printf("%d %d\n%.1f %.1f", a+b, a-b, c+d, c-d); return 0; }
include
include
include
include
int main() { int a,b; float x,y;
}
include
int main() { int a,b; float c, d; scanf("%d ", &a); scanf("%d\n", &b); scanf("%f ", &c); scanf("%f", &d); printf("%d ", a+b); printf("%d\n", a-b); printf("%.1f ", c+d); printf("%.1f", c-d); return 0; }
include
include
include
include
int main() { int a,b; float c,d; scanf("%d %d %f %f",&a,&b,&c,&d); int s=a+b; int m=a-b; float v=c+d; float h=c-d; printf("%d %d\n%.1f %.1f",s,m,v,h);
}