Write a program that read three integernumbers then compute the results of: mult
ID: 3612792 • Letter: W
Question
Write a program that read three integernumbers then compute the results of: multiplying each two numbersof those three. Finally, the program should print the medium resultbetween all the multiplication results.Example of expected output is as follows:
Enter three numbers:4 6 -3
The results of multiplying 4 X 6 = 24
The result of multiplying 4 x -3 = -12
The result of multiplying 6 x -3 = -18
The medium between all multiplications = 4 x -3 = -12
Explanation / Answer
#include void main() { int a,b,c,p,q,r,x,y,z; couta>>b>>c; p=a*b; q=b*c; r=c*a; if((p>q) && (p>r)) { if(q>r) { x=q; y=p; z=r; } else { x=r; y=p; z=q; } } elseif((q>p) && (q>r)) { if(p>r) { x=p; y=q; z=r; } else { x=r; y=p; z=q; } } elseif((r>p) && (r>q)) { if(p>q) { x=p; y=q; z=r; } else { x=q; y=p; z=r; } } coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.