Sum and Difference of Two Numbers

  • + 0 comments

    why doesn't my program get it correct ? #include

    include

    include

    include

    int main() {

    int num1,num2;
    float numb1,numb2;
    scanf("%d %d", &num1,&num2);
    scanf("%f %f", &numb1,&numb2);
    
    int sum1,sum2;
    

    sum1 = num1 + num2; sum2 = num1 - num2; printf("%d %d\n", sum1,sum2); float temp1; temp1 = numb1 + numb2; printf("%.1f %.1f\n", temp1, numb2);

    return 0;
    

    }