Sum and Difference of Two Numbers

Sort by

recency

|

616 Discussions

|

  • + 0 comments

    its simplicity, speed, and close-to-hardware control make it essential for systems programming. Mostbet

  • + 0 comments

    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; }

  • + 0 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);

    return 0;
    

    }

  • + 0 comments
    #include<stdio.h>
    
    int main()
    {
        int a, b;
        scanf("%d %d", &a, &b);
        
        float c, d;
        scanf("%f %f", &c, &d);
        
        printf("%d %d\n", (a+b), (a-b));
        printf("%0.1f %0.1f", (c+d), (c-d));
        
        return 0;
    }
    
  • + 0 comments

    include

    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\n", x + y, x - y); return 0; }

    return 0;
    

    }