Design logic for a program that outputs every even number 1 through 100.
Okay, that's not so hard. I think..
num counts[0]
counts[dep] = counts[dep] + 2
dep = 0
while dep < 100
print dep, counts[dep]
dep = dep + 2
Yabe Online Auctions requires its sellers to post items for sale for a six-week period during which the price of any unsold item drops 12 percent each week. For example, an item that costs $10.00 during the first week costs 12 percent less, or $8.80, during the second week. During the third week, the same item is 12 percent less than $8.80, or $7.74. Design an application that allows a user to input prices until an appropriate sentinel value is entered. Program output is the price of each item during each week, one through six.
Fuck.
num period1 = 1
num period2 = 2
num period3 = 3
num period4 = 4
num period5 = 5
num period6 = 6
num discount1 = 0
num discount2 = 0.12
num discount3 = 0.24
num discount4 = 0.36
num discount5 = 0.48
num discount6 = 0.60
num itemPrice = 10
counts[week] = counts[week] + 1
truePrice()
if week = period1 then
perDrop = discount1
else
if week = period2 then
perDrop = discount2
else
if week = period3 then
perDrop = discount3
else
if week = period4
perDrop = discount4
else
if week = period5
perDrop = discount5
else
if week = period6
perDrop = discount6
reubwlrbvlwebrvliwurtblviuwrbtilvrw
Okay STOP. I should've used an array for this.. I just- Cannot complete, brain is melting.