Answers for "number in c"

0

number in c

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main()
{
	int a, b;
    float c, d;
    scanf("%i %i", &a, &b);
    scanf("%f %f", &c, &d);
    int sum1 = a + b;
    int sum2 = a - b;
    float sum3 = c + d;
    float sum4 = c - d;
    printf("%i %i\n", sum1, sum2);
    printf("%.1f %.1f", sum3, sum4);
    return 0;
}
Posted by: Guest on April-25-2021

Browse Popular Code Answers by Language