Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ose two of the following three problems, you decide. 15) Write the missing state

ID: 3582824 • Letter: O

Question

ose two of the following three problems, you decide. 15) Write the missing statements in the following program so that it prompts the user to input two numbers. If one of the numbers is 0 (zero), the program should output a message indicating that both numbers must be n If the first number is greater than the second number, it outputs the first number divided by the second number; if the first number is less than the second number, it outputs the second number divided by the second number; otherwise, it outputs the product of the numbers. Hinclude Kiostream> Using namespace std; Int main 0 Int first number, second number; Cout Enter two numbers:";

Explanation / Answer

cin>>firstnumber>>secondnumber;

if(firstnumber<=0 || secondnumber <=0)

cout<<"both number must be nonzero";

elseif(firstnumber > secondnumber)

cout<<"first number is divided by second number";

elseif(firstnumber>secondnumber)

cout<<"second number is divided by first number";

else

cout<<firstnumber*secondnumber;

}

Right triangle

Print "enter 3 sides of triangle a,b,c";

if a < b{

If c< b{

if (b*b==(c*c+a*a))

print triangle is right angle

else

Print triangle is not right angle

}

else{

If(c*c ==(a*a+b*b))

Print triangle is right angle

else

print triangle is not right angle

}

}

else{

If (a*a == (b*b+c*c))

print triangle is right angle

else

Print tringle is not right angle

}