Jump to content
Sign in to follow this  
themax90

Penny A Day

Recommended Posts

themax90

Ok I wrote this script and it's just 5 minutes old but it demonstrates if you owed someone 1 penny, that doubles every day and adds to it self, how much money you would owe in just one month. Prepare to be in debt!!!

Dim $WS_OVERLAPPEDWINDOW = 0xCF0000, $WS_VISIBLE = 0x10000000, $WS_CLIPSIBLINGS = 0x04000000, $GUI_EVENT_CLOSE = -3, $i = 0, $penny = 0.01, $penny2 = 0
GUICreate("Penny a day", 240, 165, (@DesktopWidth - 241) / 2, (@DesktopHeight - 165) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$Label_1 = GUICtrlCreateLabel("Days To Run:", 10, 10, 70, 20);3
$Input_1 = GUICtrlCreateInput("", 80, 10, 150, 20);4
$Button_1 = GUICtrlCreateButton("Run", 55, 40, 130, 20);5
$Label_1 = GUICtrlCreateLabel("What would happen if you owed someone a penny a day, that doubled each day? Here's your answer.  It's alot of damn money.  So type in the duration in days up top and hit run, you will figure out it sucks!", 10, 80, 220, 80);6
GUISetState()
While 1
   $msg = GUIGetMsg()
   If $msg = $GUI_EVENT_CLOSE Then
      MsgBox(0, "See yah!!!", "Don't forget a penny saved is a penny earned.  Get someone to owe you a penny a day that doubles every day for one month and you will be rich!")
      Exit
   ElseIf $msg = 5 Then
      $days = GUICtrlRead($Input_1)
      Do
         $i = $i + 1
         $penny = $penny + $penny
         $penny2 = $penny2 + $penny
         Sleep(5)
      Until $i = $days
      $penny = $penny / 100
      MsgBox(0, "Results", "You ran this for " & $days & " days and after that amount of time you owe $" & $penny2 & "!  Good luck saving!")
      $penny = 0.01
      $days = 0
      $i = 0
      $penny2 = 0
   EndIf
Wend
Exit

The point of this is to save your pennies, or get someone to owe you this!!!!!

Agent Smith

Share this post


Link to post
Share on other sites
Insolence

Well I don't know if this is entirely useful, but it looks fairly well scripted.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites
themax90

Well it's only meant to help people think of better ways to use mathematics. I was searchin posts a while back and someone did a percentage If strucute that was HUGE!!!! Instead think of mathematical/algrebraic equations. My teacher said she doubted I could even do as much as save a file(ouch that hurt you fucking bitch, see thats why people bring guns to school, not that I will you damn broad).... ANYWAY I created it to email to her and not to be cocky, but to show that within 5 minutes I did more then she could do in a 50 minute english lesson. You see I have a unique writting system, 3 prewrites, fusion of prewrites, edit 1- 2, final draft. No outlines and brainstorms. So I say accept this work or fail me, (so far I have an A, since the school disrict viewed it and are gonna change me to a higher class soon. Anyway the point being I can script and this may help people just starting with understanding variables, Do....Until's, If...Else...ElseIf...EndIf and all that great stuff etc

Thanks for the complement Insolence.

Agent Smith

Edited by Agent Smith

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×