ack/lang/basic/test/opg4.bas

11 lines
209 B
QBasic
Raw Normal View History

1985-01-24 11:27:36 +00:00
010 rem values of n using for loop (52)
020 print "n","n2","n3","1/n","square root"
030 for n=1 to 20
040 let n2= n*n
050 let n3= n*n*n
060 let r= 1/n
070 let s= n^ .5
080 print n,n2,n3,r,s
090 next n
120 end