Inappropriate Software Problems and Their Solutions in Visual Basic
Had a dream, woke up, typed this to mr.kalx.com, decided to share it here.
Q. "Every time Clarissa sees a butterfly, she gets slapped once, plus slapped again for every butterfly she has seen before. She is reduced one half slap for every stolen jelly. Design a program that will express this."
A:
Private Sub btnSlaps_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSlaps.Click Dim butterfly As Integer Dim slaps As Double Dim jellies As Integer Dim jellyslap As Double
MsgBox("Clarissa should be slapped " & FormatNumber(slaps, 2) & " times for seeing " & butterfly & " butterflies if she has stolen " & jellies & " jellies.", , "")