Logic 2

Problem #1: Write the program for the first problem in the logic assignment.

start
  var1 = 10
  var2 = 20
  wksum = 0
  rslt = 0
  do while var2 < 30
     wksum = var1 + var2
     if wksum > 30
        var1 = var1 - 2
        var2 = var2 + 1
     else
        var1 = var1 - 1
        var2 = var2 + 3
     end if
  end while loop
  rslt = var1 + var2
  display rslt
end 

Problem #2: Take in the price you paid for each of the four items you bought. You need to use a loop to do this, so inside the loop you will be prompted for a price and you will accumulate the total. I want you to go through the loop 4 times since you are purchasing 4 items. When the loop is complete, figure out the tax assuming a 5% tax. Display the the total amount you paid for the 4 items without tax and the total you paid including the tax.

Problem #3: Redo the program above but instead of doing it 4 times, due it until the total is greater than 200. I want you to then display the total amount you paid without taxes and the total amount you paid including the tax.

Problem #4: Redo the program one more time.This time I want you to have a loop that will take in the score and I want the loop to end when the user decides they want to end. So you need to prompt the user for a response and end or continue the loop depending on their response. When the user ends the loop, display the total amount you paid without taxes and the total amount you paid with taxes.

Problem #5: Write the code for the rock, paper, scissors program we discussed in class. See the Smartboard notes for 3/22/18 for notes.I want you to write your own code. If you use a feature in the language we have not covered in class, you must include an explanation of how it works and why you used it.