Deramaxx

Low Prices & Free Shipping!
 
 

I need help from someone to write pseudocode for this certain problem please?

The owner of the Fuzzy Logic Pet Store needs the following programs:
a.The owner has agreed to make a donation to the local animal shelter for every pet sale. The user enters an animal type and sale price. Output is the donation amount, calculated as 10 percent of the sale price. Draw the flowchart and write the pseudocode for this program.
b.The pet store owner needs a weekly sales report. The user continuously inputs records containing an animal type and the price, ending with “XXX” as a sentinel animal type. The output consists of a printed report titled PET SALES, with column headings Type of Animal and Price. After all records print, a footer line “END OF REPORT” prints. Design the report, then draw the flowchart or write the pseudocode for this program.

Here is one way the report could look:

PET SALES

Type of AnimalPrice
XXXXX$99.99
XXXXX$99.99
XXXXX$99.99

END OF REPORT

Note that X stands for an alphabetical character while 9 stands for a numeral. This report design says the type of animal will be output in a field up to 5 characters wide and will display the price up to $99.99.

Here’s the beginning of the pseudocode. Notice that HEAD and COL_HEADS print once at the beginning of the report and FOOT prints once at the end of the report. Compare the code with the report design to see where these are printed. All of the elements that are printed between the HEAD and the FOOT are printed in the loop, one line for each cycle through the loop. Also note that we are assuming that we can tell the computer when to send text to the screen and when to send it to the printer. The command display is used for text to display on the screen while print is used for text that is sent to the printer.

start
declare variables
string animalType
num salePrice
string HEAD = “PET SALES”
string COL_HEADS = “Type of AnimalPrice”
string FOOT = “END OF REPORT”

print HEAD
print COL_HEADS
display “Enter the animal type:”
get animalType
display “Enter the sale price:”
get salePrice
while ‘Enter the test that ends the loop

‘Enter what must occur during each cycle through the loop

endwhile
print FOOT
stop

The answer is provided by :
Rina Thr 5 :

You may contact a programmer live at website like http://ijug.net/ ,etc .

Leave a Reply