rasim Posted July 19, 2008 Share 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) Link to comment Share on other sites More sharing options...
Malkey Posted July 19, 2008 Share 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Ê Link to comment Share on other sites More sharing options...
rasim Posted July 19, 2008 Author Share Posted July 19, 2008 MalkeyYea! Nice solution! Thank you! muttley Link to comment Share on other sites More sharing options...
rasim Posted July 19, 2008 Author Share 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) Link to comment Share on other sites More sharing options...
BrettF Posted July 19, 2008 Share 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! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 19, 2008 Moderators Share 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. Link to comment Share on other sites More sharing options...
rasim Posted July 19, 2008 Author Share 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 Link to comment Share on other sites More sharing options...
BrettF Posted July 19, 2008 Share 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! Link to comment Share on other sites More sharing options...
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