Question: I need help with the if statement and comparing the variables using &&. If theres a tie in the inputs, the first input breaks the

I need help with the if statement and comparing the variables using &&. If theres a tie in the inputs, the first input breaks the tie. The C++ needs to be very basic.  I need help with the if statement and comparing the variables
using &&. If theres a tie in the inputs, the first input

For the second part of this assignment, you will ask the user to input positive integers for four personality aspects: bravery, loyalty, intelligence, and cunning. As you might have guessed, these aspects correspond to Gryffindor, Hufflepuff, Ravenclaw, and Slytherin, respectively. You may assume that the user will always input a positive integer for these aspets The fomrulae for cadeculating the percent matchesis Gryffindor Bravery/Total; Hufflepuff = Loyalty/Total; Ravenclaw Intelligence/Total; Slytherin = Cunning, Total During display, each percentage should be rounded to two decimal points (see the appendix for how to use setprecision and fixed). Next, you will store the name of the highest matching house in a variable. The user's final house will be the one that has the highest input value. If there is a tie between two or more houses, choose the house that comes first in the list above At the end, your program should print out the user's pet choice and their house

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!