Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

2 of 5
About error msg
Adám
  • 31.8k
  • 4
  • 131
  • 292

#Dyalog APL 16.0, 17 bytes

Prompts for column, row, character. Gives INDEX ERROR on faulty input.

⍞@(⊂(6-⎕)⎕)⊢5 5⍴0

⍞@(⊂...) replace with inputted character at position

(6-⎕)⎕ [row] 6 – input, [column] input

of

5 5⍴0 ×ばつ5 grid of zeros

Adám
  • 31.8k
  • 4
  • 131
  • 292

AltStyle によって変換されたページ (->オリジナル) /