Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Draw a flowchart, write an algorithm and design a C++ program for a store owner who wants to give 10% discount to the purchases made by customers who are at least 65 years old. Use the selection structure.


How to print triple slash in codechum

The area of a triangle whose sides a, b, and c can be computed by the formula:


𝑨𝒓𝒆𝒂 𝒐𝒇 π‘»π’“π’Šπ’‚π’π’ˆπ’π’† = βˆšπ‘ ((𝑠 βˆ’ π‘Ž)(𝑠 βˆ’ 𝑏)(𝑠 βˆ’ 𝑐))


where S = (a+b+c)/2. On the other hand, the hypotenuse of a right triangle can be computed using the


formula:


3. π»π‘¦π‘π‘œπ‘‘π‘’π‘›π‘’π‘ π‘’ = βˆšπ‘Ž


2 + 𝑏


2 .


Write a program that can compute for the Area of a Triangle and the Hypotenuse of a right triangle. Your


program must allow the user to choose what computation to take first. Only one computation at a time. Use


a function for each computation. Allow the user to repeat the entire process as often as he/she wants

2. The area of a triangle whose sides a, b, and c can be computed by the formula:


𝑨𝒓𝒆𝒂 𝒐𝒇 π‘»π’“π’Šπ’‚π’π’ˆπ’π’† = βˆšπ‘ ((𝑠 βˆ’ π‘Ž)(𝑠 βˆ’ 𝑏)(𝑠 βˆ’ 𝑐))

The area of a triangle whose sides a, b, and c can be computed by the formula:


𝑨𝒓𝒆𝒂 𝒐𝒇 π‘»π’“π’Šπ’‚π’π’ˆπ’π’† = βˆšπ‘ ((𝑠 βˆ’ π‘Ž)(𝑠 βˆ’ 𝑏)(𝑠 βˆ’ 𝑐))


where S = (a+b+c)/2. On the other hand, the hypotenuse of a right triangle can be computed using the


formula:



One (1) euro is equivalent to fifty five (55) pesos and one (1) dollar is equivalent to 44 pesos. Write a program



that converts dollar to euro. The program should ask the user to input an amount in dollar and display the



equivalent amount in euro. Use a function for the conversion. Allow the user to repeat as often as the user



wants.




A



method



addWin()


,



which



takes



no



arguments



and



increments



the



number



of



times



the



player has won.



β€’



A



toString()



method,



which



takes



no



arguments



and



returns



(as



a



String


)



the



player’s



name, followed by the number of points in parentheses.



For example, if the player’s name



is



Jeff



and the player has 25 points, you’ll return



"Jeff (25 points)"


.



note



that the auto-



grader is vary particular about the formatting of your return String here.



Getters



for



the



name



(


String


),



number



of



points



(


int


),



and



number



of



wins



(


int


).



These



should be called



getName()


,



getScore()


, and



getWins()


, respectively.



β€’



A method



addPoints()


, which takes in an



int



and adds that number to the total number of



points the user has.



β€’



A method



resetScore()


, which takes no arguments and resets the player’s score to zero.



A constructor which takes in a



String


, the player’s name.



If the



String



given is



null



or the



empty string (


""


), set the player’s name to a



unique



non-empty value (in my reference code,



I use ”Player 1”, ”Player 2”, etc).



Otherwise, set the name to the given



String


.



Score and



number of wins should both start at zero.




A constructor which takes no arguments. It sets the name to a



unique



non-empty string. (In



my reference code, I use ”Player 1”, ”Player 2”, etc).




Create a struct Boat include the length, name and how many nights the boat will be in the marina.

Ask the user for the length of the boat, the name of the boat and how many nights they will be staying.Β Store the info in a vector of boats but do not allow more than 20 boats because that is the capacity of the marina.Β Allow the user to print out all the boats that are 40 feet or above.Β Write a menu so the user can continue until they wish to quit.


LATEST TUTORIALS
APPROVED BY CLIENTS