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
|
601 Discussions
|
Please Login in order to post a comment
int main() { int a, b; float c, d; scanf("%d %d", &a, &b); scanf("%f %f", &c, &d); printf("%d %d\n", a+b, a-b); printf("%.1f %.1f", c+d, c-d);
}
int main() { int i_x; int i_y; float f_x; float f_y;
}
int a,b; printf("enter a number"); scanf("%d", &a); printf("enter a number"); scanf("%d", &b); printf("the sum is: %d\n", a+b); printf("the diff is: %d\n", a-b);
}