Sum and Difference of Two Numbers

  • + 0 comments
    **Here is Sum and difference of two numbers solution in c**
    #include <stdio.h>
    #include <string.h>
    #include <math.h>
    #include <stdlib.h>
    
    int main()
    {
    	int a,b;
        float i,j;
        scanf("%d %d\n%f %f",&a,&b,&i,&j);
        printf("%d %d\n%.1f %.1f",a+b,a-b,i+j,i-j);
        return 0;
    }