#include <string.h>
#include <stdio.h>
int rows;
int col;
int chars;
int callLetter;
int characters;
int counter;
char userinput[100];
char alfabetlow[26][7][5] = {{" "," "," *** "," *"," ****","* *"," *** "},//lower case a
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case b
{" "," "," *** ","* *","* ","* *"," *** "},//lower case c
{" *"," *"," *"," ****","* *","* *"," *** "},//lower case d
{" "," "," *** ","* *","*****","* "," *** "},//lower case e
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case f
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case g
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case h
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case i
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case j
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case k
{"* ","* ","* ","**** ","* *","* *"," *** "},//lower case l
{"* ","* ","**** ","* * *","* * *","* * *","* * *"},//lower case m
{" "," ","**** ","* *","* *","* *","* *"},//lower case n
{" "," "," *** ","* *","* *","* *"," *** "},//lower case o
{" "," ","**** ","* *","**** ","* ","* "},//lower case q
{" "," "," ****","* *"," ****"," *"," *"},//lower case q
{" "," ","* ** ","* *","* ","* ","* "},//lower case r
{" "," "," *** ","* "," *** "," *"," *** "},//lower case s
{" * "," * ","*****"," * "," * "," * *"," ** "},//lower case t
{" "," ","* *","* *","* *","* *"," ****"},//lower case u
{" "," ","* *","* *"," * * "," * * "," * "},//lower case v
{" "," ","* *","* *","* * *","* * *"," * * "},//lower case w
{" "," ","* *"," * * "," * "," * * ","* *"},//lower case x
{" "," ","* *"," * * "," * "," * ","* "},//lower case y
{" "," ","*****"," * "," * "," * ","*****"},//lower case z
};
/*」 * * ** * ** *
* * * * * * *
* * * ** * ** ** * * * * * * **** **** * **** **** * ** * ***** * * * * * * * * * * **** *
* **** * **** * * ***** * **** * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
**** * * * * * ***** * **** * * * * ** * * * * * * * * **** **** * * * * * * * * * * * * *
* * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * ** * * * * * * * * * ** * * * ** **** * * * * * * ***** */爲什麼不會輸出在終端排隊並排
int main(int argc, char const *argv[])
{
while(characters != EOF && characters != '\n'){
characters = getchar();
userinput[counter] = characters;
counter++;
}
for(col = 0; col <= 25; col++){
for(rows = 0; rows <= 6; rows++){
printf("%c", alfabetlow[rows][col][chars]);
}
}
/*//prints down over
for(col = 0; col <= 6; col++){
for(row = 0; row <= 25; row++){
for(chars = 0; chars <= 4; chars++){
printf("%c", alfabetlow[row][col][chars]);
}
printf("");
}
printf(" ");
}*/
return 0;
}
爲什麼當我在終端運行將我的代碼不是每個打印一行之後寫並排的字母側面,而不是它的權利下跌超過
是否使用在你的代碼,或只是空格的'tab's有所幫助?你的終端中的字體是什麼? –
我使用的標籤,它會在終端星星要打印,我想創建一個程序,將打印出任何輸入到恆星終端 –
媽的,我做了一個類似的pogram垃圾郵件的「按Ctrl + f看到消息「在youtube上,但在C++中...... – Treycos