**New course!**Every coder should learn

**Generative AI!**

0

# Can someone help me with this

Write a program to carry out addition, division, subtraction, and multiplication of two numbers. The program should also compute the sum and average of all the numbers. The program should give the following output: The sum of a+b=c The result of a/b=d The result of a-b=e The product a*b=f The sum of a+b+c+d+e+f = sum The average of a,b,c,d,e,f = avg If a = 5 and b = 4 then the output should be 5 + 4 = 9, that is, only values of variables should be included in the above outputs. Note that a,b,c,d,e,f are variables and should be declared accordingly. Ensure that you are able to explain the working of every statement in your program code.

1 Answer

+ 2

You should put a little more effort in doing your homework, this is pretty basic.
Start by declaring all of your 8 variables, then use scanf() to get your two inputs from the user. Then do all the operations listed, putting the result in a different variable each time, and print as instructed.