comments
This commit is contained in:
parent
198e16ad7f
commit
f3e03e53b4
|
@ -1,5 +1,6 @@
|
||||||
import strutils, sequtils
|
import strutils, sequtils
|
||||||
|
|
||||||
|
#? validate if user input is of correct type
|
||||||
proc getInt: int =
|
proc getInt: int =
|
||||||
while(true):
|
while(true):
|
||||||
try:
|
try:
|
||||||
|
@ -7,6 +8,7 @@ proc getInt: int =
|
||||||
except:
|
except:
|
||||||
echo "Please enter an integer, try again."
|
echo "Please enter an integer, try again."
|
||||||
|
|
||||||
|
#? validate if user input is of correct type
|
||||||
proc getFloat: float =
|
proc getFloat: float =
|
||||||
while(true):
|
while(true):
|
||||||
try:
|
try:
|
||||||
|
@ -81,7 +83,7 @@ proc dot* =
|
||||||
|
|
||||||
#? resultent matrix
|
#? resultent matrix
|
||||||
var m: seq[seq[float]]
|
var m: seq[seq[float]]
|
||||||
m = calcDot(m1, m2) #? calculate dot product (in procedures)
|
m = calcDot(m1, m2)
|
||||||
|
|
||||||
echo "\nFirst matrix is:"
|
echo "\nFirst matrix is:"
|
||||||
printMatrix(m1)
|
printMatrix(m1)
|
||||||
|
|
Loading…
Reference in a new issue