Create a two-dimensional array at runtime: Difference between revisions

Initial FutureBasic task solution added
(Initial FutureBasic task solution added)
Line 1,853:
println[a@(rows-1)@(cols-1)]
</syntaxhighlight>
 
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
CFStringRef iStr, jStr
long i, j
 
iStr = input @"Enter one positive integer: "
jStr = input @"Enter other positive integer: "
i = fn StringIntegerValue(iStr)
j = fn StringIntegerValue(jStr)
mda (0, 0) = {i, j}
mda (i, j) = i * j
printf @"mda(%ld, %ld) = %ld", i, j, mda_integer (i, j)
 
HandleEvents
</syntaxhighlight>
{{output}}
With inputs of 7 and 5:
<pre>
mda(5, 7) = 35
</pre>
 
 
=={{header|GAP}}==
717

edits