forked from smallbasic/smallbasic.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path123.bas
More file actions
45 lines (39 loc) · 628 Bytes
/
Copy path123.bas
File metadata and controls
45 lines (39 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'''Howto using the SmallBasic Subroutine LinEqn
''for Solution Systems'' Equations
''with dim declared arrays
''by Adolfo Leon Sepulveda
''Sep/30/2004
dim a(2,2) ''array of 3x3
Dim b(2,0) ''array of 3x1
a(0,0)=5
a(0,1)=-2
a(0,2)=3
a(1,0)=-2
a(1,1)=7
a(1,2)=5
a(2,0)=3
a(2,1)=5
a(2,2)= 6
b(0,0)=-2
b(1,0)=7
b(2,0)=9
print "System Eq:"
for i = 0 to 2
for j = 0 to 2
print using " +###.00";a(i,j);
print " x";j+1;
next j
print " = ";
print using "###.00";b(i,0)
next i
Print
''**************
c=LinEqn(a,b)
''**************
for i = 0 to 2
print "x";i+1;" =";
print using "###.00";c(i,0)
next i
Print
end
'