You are viewing a single comment's thread. Return to all comments →
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; }
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
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; }