nordlead said:
SamuelRSmith said:
superchunk said: 1. Update your drivers 2. Retest
if (broken) { buyNew(); } else { beHappy(); }
|
I wanna pad this out a bit more:
Module DiscTray
public currentFunds as double public trayPrice as double = 25
Sub Main() dim broken as boolean
'someone else can write test code.
console.writeline("What are you current funds?") currentFunds = console.readline()
if (broken = True) then buyNew() else beHappy() endif
console.readline()
End Sub
sub buyNew() dim action as string = "Purchase" dim mood as string = "pissed" dim wallet as integer = currentFunds - trayPrice
console.writeline("You need to buy new drive. Remaining funds: " & wallet)
if (wallet > 0) then console.writeline(mood) else console.writeline(mood & mood) endif
End Sub
sub beHappy() dim hormone as string hormone = "endorphins"
console.writeline("Releasing " & hormone)
end sub
|
you could at least use something besides VB which has to be the worst language ever invented, and only supported because people cried to microsoft to continue it. (they did try to kill it) (edit, or maybe it is something similar to VB, but I'm not 100% sure)
|
Yeah, it's VB... I was using it for college shit at the time, so I was in that mindset. (Not only that, but I like VB).