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
|
619 Discussions
|
Please Login in order to post a comment
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
include
int main() { int a,b; float c,d; scanf("%d %d\n%f %f",&a,&b,&c,&d); printf("%d %d\n%.1f %.1f",a+b ,a-b,c+d,c-d);
return 0; }