rasim Posted July 19, 2008 Posted July 19, 2008 Ok, just from curiosity, there is any (easy) way to creating the Pythagor table? My solution muttley #include <Array.au3> Global $aNumbers[10][10] ;Array filling For $i = 1 To UBound($aNumbers) - 1 $aNumbers[$i][0] = $i $aNumbers[0][$i] = $i Next ;Multiplying For $i = 1 To UBound($aNumbers) - 1 For $j = 1 To UBound($aNumbers) - 1 $aNumbers[$i][$j] = $aNumbers[$i][0] * $aNumbers[0][$j] Next Next _ArrayDisplay($aNumbers)
Malkey Posted July 19, 2008 Posted July 19, 2008 Ok, just from curiosity, there is any (easy) way to creating the Pythagor table? My solution muttley #include <Array.au3> Global $aNumbers[10][10] ;Array filling For $i = 1 To UBound($aNumbers) - 1 $aNumbers[$i][0] = $i $aNumbers[0][$i] = $i Next ;Multiplying For $i = 1 To UBound($aNumbers) - 1 For $j = 1 To UBound($aNumbers) - 1 $aNumbers[$i][$j] = $aNumbers[$i][0] * $aNumbers[0][$j] Next Next _ArrayDisplay($aNumbers)oÝ÷ Ûú®¢×z·¢¶+"ÞÍ{e¢Sê.¶$²Ø^±©j̨º»ºÚ"µÍÚ[ÛYH Ð^K]LÉÝÂØØ[ ÌÍØS[XÖÌLVÌLNÓ][Z[ÂÜ ÌÍÚHHHÈPÝ[ ÌÍØS[XÊHHBÜ ÌÍÚHHÈPÝ[ ÌÍØS[XÊHHBBIÌÍØS[XÖÉÌÍÚWVÌHH ÌÍÚBBIÌÍØS[XÖÌVÉÌÍÚHH ÌÍÚ ÌÍØS[XÖÉÌÍÚWVÉÌÍÚHH ÌÍÚJÌÍÚBB^^Ð^QÜ^J ÌÍØS[XÊ
rasim Posted July 19, 2008 Author Posted July 19, 2008 Corrected: #include <Array.au3> Local $aNumbers[10][10];Multiplying For $i = 1 To UBound($aNumbers) - 1 $aNumbers[$i][0] = $i $aNumbers[0][$i] = $i For $j = 1 To UBound($aNumbers) - 1 $aNumbers[$i][$j] = $i * $j Next Next _ArrayDisplay($aNumbers)
BrettF Posted July 19, 2008 Posted July 19, 2008 Corrected: #include <Array.au3> Local $aNumbers[10][10];Multiplying For $i = 1 To UBound($aNumbers) - 1 $aNumbers[$i][0] = $i $aNumbers[0][$i] = $i For $j = 1 To UBound($aNumbers) - 1 $aNumbers[$i][$j] = $i * $j Next Next _ArrayDisplay($aNumbers)Could have kept as: #include <Array.au3> Local $aNumbers[10][10];Multiplying For $i = 1 To UBound($aNumbers) - 1 For $j = 1 To UBound($aNumbers) - 1 $aNumbers[$i][0] = $i $aNumbers[0][$i] = $i $aNumbers[$i][$j] = $i*$j Next Next _ArrayDisplay($aNumbers) Either all, it works the same muttley Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Moderators SmOke_N Posted July 19, 2008 Moderators Posted July 19, 2008 Could have kept as: #include <Array.au3> Local $aNumbers[10][10];Multiplying For $i = 1 To UBound($aNumbers) - 1 For $j = 1 To UBound($aNumbers) - 1 $aNumbers[$i][0] = $i $aNumbers[0][$i] = $i $aNumbers[$i][$j] = $i*$j Next Next _ArrayDisplay($aNumbers) Either all, it works the same muttleyThe output might be the same... but it certainly does Not work the same. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
rasim Posted July 19, 2008 Author Posted July 19, 2008 BertAs say SmOke_N your example not work the same, also your example do slowed work. Why need to set same value into this array 9 time$aNumbers[$i][0] = $i $aNumbers[0][$i] = $imuttley
BrettF Posted July 19, 2008 Posted July 19, 2008 Ok muttley should have known.... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now