Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Text to ASCII (top)
#include <math.h> #include <stdio.h> #include <time.h> #include <stdlib.h> #include <string.h> int main(void) { char wort[] = "PPAP Pen Pineapple Apple Pen";//<-- Eingabe (imput) int lang,i,j,gesl=0; lang = strlen(wort); for(i=0;i<lang;i++){ if(wort[i]==' '){ gesl=gesl+4; } else if(wort[i]=='i'||wort[i]=='I'){ gesl=gesl+2; } else if(wort[i]=='t'||wort[i]=='T'){ gesl=gesl+6; } else if(wort[i]=='y'||wort[i]=='Y'){ gesl=gesl+6; } else{ gesl=gesl+7; } } if(gesl>245){ printf("zu lang (to long)"); return 0; } printf("%s,%d,ges:%d,\n\n",wort,lang,gesl); for(i=1;j<7;j++){ for(i=0;i<lang;i++){ if(wort[i]==' '){ if(j==1){ printf(" "); } if(j==2){ printf(" "); } if(j==3){ printf(" "); } if(j==4){ printf(" "); } if(j==5){ printf(" "); } if(j==6){ printf(" "); } } else if(wort[i]=='e'||wort[i]=='E'){ if(j==1){ printf("###### "); } if(j==2){ printf("# "); } if(j==3){ printf("##### "); } if(j==4){ printf("# "); } if(j==5){ printf("# "); } if(j==6){ printf("###### "); } } else if(wort[i]=='n'||wort[i]=='N'){ if(j==1){ printf("# # "); } if(j==2){ printf("## # "); } if(j==3){ printf("# # # "); } if(j==4){ printf("# # # "); } if(j==5){ printf("# ## "); } if(j==6){ printf("# # "); } } else if(wort[i]=='i'||wort[i]=='I'){ if(j==1){ printf("# "); } if(j==2){ printf("# "); } if(j==3){ printf("# "); } if(j==4){ printf("# "); } if(j==5){ printf("# "); } if(j==6){ printf("# "); } } else if(wort[i]=='s'||wort[i]=='S'){ if(j==1){ printf(" #### "); } if(j==2){ printf("# "); } if(j==3){ printf(" #### "); } if(j==4){ printf(" # "); } if(j==5){ printf("# # "); } if(j==6){ printf(" #### "); } } else if(wort[i]=='r'||wort[i]=='R'){ if(j==1){ printf("##### "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("##### "); } if(j==5){ printf("# # "); } if(j==6){ printf("# # "); } } else if(wort[i]=='a'||wort[i]=='A'){ if(j==1){ printf(" ## "); } if(j==2){ printf(" # # "); } if(j==3){ printf("# # "); } if(j==4){ printf("###### "); } if(j==5){ printf("# # "); } if(j==6){ printf("# # "); } } else if(wort[i]=='t'||wort[i]=='t'){ if(j==1){ printf("##### "); } if(j==2){ printf(" # "); } if(j==3){ printf(" # "); } if(j==4){ printf(" # "); } if(j==5){ printf(" # "); } if(j==6){ printf(" # "); } } else if(wort[i]=='d'||wort[i]=='D'){ if(j==1){ printf("##### "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("# # "); } if(j==5){ printf("# # "); } if(j==6){ printf("##### "); } } else if(wort[i]=='h'||wort[i]=='H'){ if(j==1){ printf("# # "); } if(j==2){ printf("# # "); } if(j==3){ printf("###### "); } if(j==4){ printf("# # "); } if(j==5){ printf("# # "); } if(j==6){ printf("# # "); } } else if(wort[i]=='u'||wort[i]=='U'){ if(j==1){ printf("# # "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("# # "); } if(j==5){ printf("# # "); } if(j==6){ printf(" #### "); } } else if(wort[i]=='l'||wort[i]=='L'){ if(j==1){ printf("# "); } if(j==2){ printf("# "); } if(j==3){ printf("# "); } if(j==4){ printf("# "); } if(j==5){ printf("# "); } if(j==6){ printf("###### "); } } else if(wort[i]=='c'||wort[i]=='C'){ if(j==1){ printf(" #### "); } if(j==2){ printf("# # "); } if(j==3){ printf("# "); } if(j==4){ printf("# "); } if(j==5){ printf("# # "); } if(j==6){ printf(" #### "); } } else if(wort[i]=='g'||wort[i]=='G'){ if(j==1){ printf(" #### "); } if(j==2){ printf("# # "); } if(j==3){ printf("# "); } if(j==4){ printf("# ### "); } if(j==5){ printf("# # "); } if(j==6){ printf(" #### "); } } else if(wort[i]=='m'||wort[i]=='M'){ if(j==1){ printf("# # "); } if(j==2){ printf("## ## "); } if(j==3){ printf("# ## # "); } if(j==4){ printf("# # "); } if(j==5){ printf("# # "); } if(j==6){ printf("# # "); } } else if(wort[i]=='o'||wort[i]=='O'){ if(j==1){ printf(" #### "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("# # "); } if(j==5){ printf("# # "); } if(j==6){ printf(" #### "); } } else if(wort[i]=='b'||wort[i]=='B'){ if(j==1){ printf("##### "); } if(j==2){ printf("# # "); } if(j==3){ printf("##### "); } if(j==4){ printf("# # "); } if(j==5){ printf("# # "); } if(j==6){ printf("##### "); } } else if(wort[i]=='w'||wort[i]=='W'){ if(j==1){ printf("# # "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("# ## # "); } if(j==5){ printf("## ## "); } if(j==6){ printf("# # "); } } else if(wort[i]=='f'||wort[i]=='F'){ if(j==1){ printf("###### "); } if(j==2){ printf("# "); } if(j==3){ printf("##### "); } if(j==4){ printf("# "); } if(j==5){ printf("# "); } if(j==6){ printf("# "); } } else if(wort[i]=='k'||wort[i]=='K'){ if(j==1){ printf("# # "); } if(j==2){ printf("# # "); } if(j==3){ printf("#### "); } if(j==4){ printf("# # "); } if(j==5){ printf("# # "); } if(j==6){ printf("# # "); } } else if(wort[i]=='z'||wort[i]=='Z'){ if(j==1){ printf("###### "); } if(j==2){ printf(" # "); } if(j==3){ printf(" # "); } if(j==4){ printf(" # "); } if(j==5){ printf(" # "); } if(j==6){ printf("###### "); } } else if(wort[i]=='p'||wort[i]=='P'){ if(j==1){ printf("##### "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("##### "); } if(j==5){ printf("# "); } if(j==6){ printf("# "); } } else if(wort[i]=='v'||wort[i]=='V'){ if(j==1){ printf("# # "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("# # "); } if(j==5){ printf(" # # "); } if(j==6){ printf(" ## "); } } else if(wort[i]=='j'||wort[i]=='J'){ if(j==1){ printf(" # "); } if(j==2){ printf(" # "); } if(j==3){ printf(" # "); } if(j==4){ printf(" # "); } if(j==5){ printf("# # "); } if(j==6){ printf(" #### "); } } else if(wort[i]=='y'||wort[i]=='Y'){ if(j==1){ printf("# # "); } if(j==2){ printf(" # # "); } if(j==3){ printf(" # "); } if(j==4){ printf(" # "); } if(j==5){ printf(" # "); } if(j==6){ printf(" # "); } } else if(wort[i]=='x'||wort[i]=='X'){ if(j==1){ printf("# # "); } if(j==2){ printf(" # # "); } if(j==3){ printf(" ## "); } if(j==4){ printf(" ## "); } if(j==5){ printf(" # # "); } if(j==6){ printf("# # "); } } else if(wort[i]=='q'||wort[i]=='Q'){ if(j==1){ printf(" #### "); } if(j==2){ printf("# # "); } if(j==3){ printf("# # "); } if(j==4){ printf("# # # "); } if(j==5){ printf("# # "); } if(j==6){ printf(" ### # "); } } else{ if(j==1){ printf("###### "); } if(j==2){ printf("###### "); } if(j==3){ printf("###### "); } if(j==4){ printf("###### "); } if(j==5){ printf("###### "); } if(j==6){ printf("###### "); } } } printf("\n"); } return 0; }
run
|
edit
|
history
|
help
0
Tern operators
bit shift and mask
FahrenheitToCelciusReverse
Finding the second largets value v0.6
CO_assign_q4
algo de avance
Part 1: Draw Arts
rsqrt from 0
Fgets and String Stuff
pseudo hw