Create pseudocode to represent the logic of your program that:
Asks the user how many Darth Vader Check Print Silk Ties they
want to buy.
Each Darth Vader Check Print Silk Tie costs the user $64.99.
Calculate how much the user will spend.
If the user spends over $200.00, they are a big spender. You will
set the value of a character variable to indicate whether they are
a big spender or not.
Display a message stating how much the user spent and if they are a big spender or not. Evaluate the value of your “big spender” variable to decide which message you will display.
You do not need to have any modules other than the main module in your program.
Your program will have variables to hold the following information:
quantity of Darth Vader Check Print Silk Ties user wants to buy
total amount user spends on Darth Vader Check Print Silk Ties
whether they are a big spender or not (Y = yes, N = no)
Your program will have a named constant to hold the following information:
cost of each Darth Vader Check Print Silk Tie
Pseudo code:
1. Ask user how many Darth Vader Check Print Silk Ties he want to
buy. as it should have named constant for price
consider int quantity := value;
const int per_tie = 64.99;
2.Calculate total_price i.e amount user is spending on ties
i.e float toatl_amount =per_tie*quantity;
3.Check the condition.If toatl_amount >=200 then we declare a
character variable to store the message.
if(toatl_amount) >=200
char big_spender = 'Y';
else
big_spender = 'N';
4.Check if big_spender = 'y' display message as user is big spender
and how much he has spent i.e toatl_amount
if(big_spender == 'Y')
print ("User is big sender and he has spent "+ toatl_amount);
Get Answers For Free
Most questions answered within 1 hours.