Question: Coded in C++ please Integer variables numpomegranates and allowance are read from input A pomegranate costs 3 dollars. - If numpomegranates is less than 2,
Integer variables numpomegranates and allowance are read from input A pomegranate costs 3 dollars. - If numpomegranates is less than 2, output 'Not enough pomegranates'. - If numpomegranates is greater than or equal to 2 , then multiply numpomegranates by 3 . - If the product of numpomegranates and 3 is less than or equal to allowance, output "Approved transaction: - otherwise, output 'Need more money to purchase all:'. End with a newline. Ex. If the input is 964 , then the output is: Approved transaction. 1 tinclude numpomegranates; cin allowance; " Your code goes here return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
