You are viewing a single comment's thread. Return to all comments →
int main() { int a,b; float c,d; scanf("%d%d",&a,&b); scanf("%f %f",&c,&d); printf("%d %d",a+b,a-b); printf("\n"); printf("%0.1f %0.1f",c+d,c-d);
return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
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%d",&a,&b); scanf("%f %f",&c,&d); printf("%d %d",a+b,a-b); printf("\n"); printf("%0.1f %0.1f",c+d,c-d);
}