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
|
620 Discussions
|
Please Login in order to post a comment
int main() { int a, b; float x, y; scanf("%d %d", &a, &b); scanf("%f %f", &x, &y); printf("%d %d\n", a+b, a-b); printf("%.1f %.1f", x+y, x-y); return 0; }
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); return 0;
1 means one, not i or L
Here is Sum and difference of two numbers solution in c - https://programmingoneonone.com/hackerrank-sum-and-difference-of-two-number-solution-in-c.html
its simplicity, speed, and close-to-hardware control make it essential for systems programming. Mostbet