Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width = input('Rows: ');
- height = input('Collums: ');
- height = (height * 2)
- for y = 0 : 1 : height
- for x = 0 : 1 : width
- if x == width
- if mod(y,2) == 1
- fprintf('|')
- else
- fprintf('+')
- end
- else
- if mod(y,2) == 1
- fprintf('| ')
- else
- fprintf('+---------')
- end
- end
- end
- fprintf('\n');
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement