Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
36
Task/Vector/Ring/vector.ring
Normal file
36
Task/Vector/Ring/vector.ring
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Project : Vector
|
||||
|
||||
decimals(1)
|
||||
vect1 = [5, 7]
|
||||
vect2 = [2, 3]
|
||||
vect3 = list(len(vect1))
|
||||
|
||||
for n = 1 to len(vect1)
|
||||
vect3[n] = vect1[n] + vect2[n]
|
||||
next
|
||||
showarray(vect3)
|
||||
|
||||
for n = 1 to len(vect1)
|
||||
vect3[n] = vect1[n] - vect2[n]
|
||||
next
|
||||
showarray(vect3)
|
||||
|
||||
for n = 1 to len(vect1)
|
||||
vect3[n] = vect1[n] * vect2[n]
|
||||
next
|
||||
showarray(vect3)
|
||||
|
||||
for n = 1 to len(vect1)
|
||||
vect3[n] = vect1[n] / 2
|
||||
next
|
||||
showarray(vect3)
|
||||
|
||||
func showarray(vect3)
|
||||
see "["
|
||||
svect = ""
|
||||
for n = 1 to len(vect3)
|
||||
svect = svect + vect3[n] + ", "
|
||||
next
|
||||
svect = left(svect, len(svect) - 2)
|
||||
see svect
|
||||
see "]" + nl
|
||||
Loading…
Add table
Add a link
Reference in a new issue