int main() { int m, n; printf("Enter 2 integers:"); scanf("%d,%d", m, n); printf("%d + %d is %d\n", m, n, m + n); return 0; } [thunder] ~ > cc format.c [thunder] ~ > a.out Enter 2 integers:55, 65 0 + 0 is 0 int main() { int m, n, sum; printf("Enter 2 integers:"); scanf("%d,%d", &m, &n); printf("%d + %d is %d\n", m, n, m + n); return 0; } [thunder] ~ > cc format.c [thunder] ~ > a.out Enter 2 integers:55, 65 55 + 65 is 120 Review of Problem to calculate product of fractions: Sample dialogue: Enter first fraction: 4 / 6 Enter second fraction: 6 / 8 4/6 x 6/8 is 24/48 24/48 is 50.0000% Analysis Data requirements: Problem inputs int num_1, denom_1, num_2, denom_2; Problem outputs int num_prod, /* numerator of product */ denom_prod /* denominator of product */ double percent /* percentage */ Formulas: num_prod = num_1 * num_2 denom_prod = denom_1 * denom_2 percent = (num_prod) / (denom_prod) * 100; Design: 1. Read first fraction 2. Read second fraction 3. Calculate product 4. Calulate percentage 5. Display product 6. Display percentage Implementation #include int main() { /* variable declarations */ /* Problem inputs */ int num_1, denom_1, num_2, denom_2; /* Problem outputs */ int num_prod, /* num of product */ denom_prod; /* denom of product */ double percent; /* percentage */ /* Read first fraction */ printf("Enter first fraction: "); scanf("%d/%d", &num_1, &denom_1); /* Read second fraction */ printf("Enter second fraction: "); scanf("%d/%d", &num_2, &denom_2); /* Calculate product */ num_prod = num_1 * num_2; denom_prod = denom_1 * denom_2; /* Calulate percentage */ percent = ((double) num_prod / (double) denom_prod) * 100.0; /* Display product */ printf("%d/%d x %d/%d is %d/%d\n", num_1, denom_1, num_2, denom_2, num_prod, denom_prod); /* Display percentage */ printf("%3d/%3d is %4.1f %%\n", num_prod, denom_prod, percent); return 0; } Enter first fraction: 4/6 Enter second fraction: 6/8 4/6 x 6/8 is 24/48 24/ 48 is 50.0 % Assignment: Modify this program so that it calculates the sum of 2 fractions rather than their product: Hint: 4/6 + 6/8 is 32/48 + 36/48 = 68/48