How to Convert letters to underscore
2 ビュー (過去 30 日間)
古いコメントを表示
I am creating a hangman script and I need help:
I need to ask player 1 to enter a word and after the word is entered I need the word to be converted to underscores depending on how many letters there are.
For example if player 1 entered: Apple
Then the command window would:
clear
clc
_ _ _ _ _
Then Player 2 would have to guess the letters/word
2 件のコメント
Stephen23
2021 年 5 月 4 日
編集済み: Stephen23
2021 年 5 月 4 日
Original question by DP retrieved from Google Cache:
How to Convert letters to underscore
I am creating a hangman script and I need help:
I need to ask player 1 to enter a word and after the word is entered I need the word to be converted to underscores depending on how many letters there are.
For example if player 1 entered: Apple
Then the command window would:
clear
clc
_ _ _ _ _
Then Player 2 would have to guess the letters/word
回答 (1 件)
Jonas
2021 年 5 月 2 日
which interpreter are you using? if you want to display an underscore eg with latex interpreter use '\_' instead of '_' .
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Numeric Types についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!