diff --git a/02-user-defined-functions/FactorialByReference.m b/02-user-defined-functions/FactorialByReference.m index 5704958..65cb586 100644 --- a/02-user-defined-functions/FactorialByReference.m +++ b/02-user-defined-functions/FactorialByReference.m @@ -1,5 +1,4 @@ - write "Enter n: " - read n,! + read "Enter n: ",n,! write n,"! = " do factorial(.n) write n,! diff --git a/02-user-defined-functions/FactorialByValue.m b/02-user-defined-functions/FactorialByValue.m index 43f1f6d..b932a47 100644 --- a/02-user-defined-functions/FactorialByValue.m +++ b/02-user-defined-functions/FactorialByValue.m @@ -1,5 +1,4 @@ - write "Enter n: " - read n,! + read "Enter n: ",n,! set result=$$factorial(n) write n,"! = ",result,! halt diff --git a/02-user-defined-functions/Fibonacci.m b/02-user-defined-functions/Fibonacci.m index a2ebd33..3a4c241 100644 --- a/02-user-defined-functions/Fibonacci.m +++ b/02-user-defined-functions/Fibonacci.m @@ -1,5 +1,4 @@ - write "Enter n: " - read n,! + read "Enter n: ",n,! set result=$$fibonacci(n) write "F(",n,") = ",result,! halt