Sum and Difference of Two Numbers

  • + 0 comments

    include

    int main() {

    int x;
    int y;
    scanf("%d %d", &x, &y);
    printf("%d %d\n", (x+y), (x-y));
    
    float a;
    float b;
    scanf("%f %f", &a, &b);
    printf("%.1f %.1f", (a+b), (a-b));
    
    return 0;
    

    }