Question: 1 9 : 5 5 exam _ 2 4 . 1 1 . 2 0 2 3 1 8 0 1 2 0 2 4
:
exam
if row or row #grid then
print Invalid row number"
return
end
for #gridrow do
print gridrowjAdjust index to indexed for
display
end
end
Main function to execute commands
function main
local grid readGrid gridtxt
if not grid then
return
end
while true do
local command ioread
if command "showcol" then QA
local col tonumberioread
if col then
showColumngrid col
else
printInvalid column number"
end
else
if command "showrow" then QB
local row tonumber ioread
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
