29 lines
672 B
C
29 lines
672 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
int ch,c,m[8];
|
|
ch = c = 0;
|
|
printf("ascii symb - its num until #\n");
|
|
while((ch = getchar()) != '#'){
|
|
m[c] = ch;
|
|
c++;
|
|
if(c == 8){
|
|
for(c = 0; c < 8; c++){
|
|
switch(m[c]){
|
|
case '\n':
|
|
printf("\\n - %d ",m[c]);
|
|
break;
|
|
case ' ':
|
|
printf("\"%c\" - %d ",m[c],m[c]);
|
|
break;
|
|
default:
|
|
printf("%c - %d ",m[c],m[c]);
|
|
}
|
|
}
|
|
printf("\n");
|
|
c = 0;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|