Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Incomplete pseudocode

pseudocode

  • Please log in to reply
3 replies to this topic

#1 mirror1

mirror1

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 22 February 2012 - 06:10 PM

Here my problem..
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%.

Heres my incomplete code. The underline means I didn't know what to write there so Im hoping one of you guys can help me out here.:confused:

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
  • 0

#2 lespauled

lespauled

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1360 posts
  • Programming Language:C, C++, C#, JavaScript, PL/SQL, Delphi/Object Pascal, Visual Basic .NET, Pascal, Transact-SQL, Bash

Posted 23 February 2012 - 06:38 AM

Is this your homework assignment?
  • 0

#3 bytelogik

bytelogik

    CC Newcomer

  • Member
  • PipPip
  • 13 posts

Posted 26 February 2012 - 02:47 AM

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

Congratulations !! I just did your homework. Hurray !! :)
  • 0

#4 lespauled

lespauled

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1360 posts
  • Programming Language:C, C++, C#, JavaScript, PL/SQL, Delphi/Object Pascal, Visual Basic .NET, Pascal, Transact-SQL, Bash

Posted 26 February 2012 - 10:22 AM

You should refrain from doing people's homework. He learned absolutely nothing from your "help".
  • 0





Also tagged with one or more of these keywords: pseudocode

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download