Here my question that I need to write in pseudocode...
The design is determining the correct sales tax depending on the country idenifying code.
Countries with a number less than 7 have a 5% salestax. The 8-24 codes have
a sales tax of 7%. Codes above 24 have a sales of tax of 9%.
Here what I got. The parts with underline means I didnt know exactly what to write but I got the format right...
Begin
Declare Real SalesTax
Declare___ country code
_____" Enter the country code: "
Input ____________
If _____ <=7 then
Set salesTax =____
ELSE
If____ AND ____ then
____
Else
Set salesTax = 0.09
EndIf
____
Display "the sales tax is: "+____
End
Can anyone help me fill in the blanks I didnt understand? Thanks in advance
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
Begin
Declare Real SalesTax
Declare country code
" Enter the country code: "
Input country code
If country code < 7 then
Set salesTax = 0.05
ELSEIf country code > 7 AND country code <25 then
Set salesTax = 0.07
Else
Set salesTax = 0.09
EndIf
____
Display "the sales tax is: "+ salesTax
End
X = 3 -> statement of variable X, shops the style 3 in X, no longer something is displayed Print the value of X -> Output training -> reflects "3" Y = 5 -> statement of variable Y, shops the style 5 in Y, no longer something is displayed if (X < Y) -> software concern is X smaller than Y? answer is real, regardless of the undeniable fact that, no longer something is displayed at this actual element Print “6” -> Output training if concern above is met. on condition that concern replaced into met (3 is smaller than 5), then the style 6 would be displayed else -> if X replaced into greater beneficial than Y (which isn't subsequently) then proceed with next training Print “7” -> Output training. The style 7 would be displayed basically while X is larger than Y, which isn't subsequently. training is handed over. end if -> This marks the top this gadget concern (if, end if) software ends