10-07-2010, 01:13 PM
BREAKTIME
Gintaras,
I need your expertise as usual. As I took a break from all of these, I tried learning your array samples.
; Generate the square root of a number between c to b
int i c b
c=2
b=101
ARRAY(int) a
for(i c b) a[]=i ;;adds and sets 1 element
for(i c a.len) out "The square root of" ; out (a); out "is" ; out sqrt(a[i]) ;; this is a working line
end
;; question for Gintaras....kindly help what am I doing wrong?
;; why does the iteration starts at 4?
;; If I want to generate square root from 3 to 100 what are the steps to revise?
;; if I want to have one line printout like[i] "The square root of 3 is 1.73205080756888"
then next line "The square root of 4 is 2.0000000000000".....and so on ( here it shows 2..how can I have say 13 decimal places)
Thank you sir,
Josh
of California
BREAKTIME
Gintaras,
I need your expertise as usual. As I took a break from all of these, I tried learning your array samples.
; Generate the square root of a number between c to b
int i c b
c=2
b=101
ARRAY(int) a
for(i c b) a[]=i ;;adds and sets 1 element
for(i c a.len) out "The square root of" ; out (a); out "is" ; out sqrt(a[i]) ;; this is a working line
end
;; question for Gintaras....kindly help what am I doing wrong?
;; why does the iteration starts at 4?
;; If I want to generate square root from 3 to 100 what are the steps to revise?
;; if I want to have one line printout like[i] "The square root of 3 is 1.73205080756888"
then next line "The square root of 4 is 2.0000000000000".....and so on ( here it shows 2..how can I have say 13 decimal places)
Thank you sir,
Josh
of California
BREAKTIME