This commit is contained in:
Павел Родионов
2025-11-13 18:21:23 +07:00
parent e266a25b45
commit 2fca7b75f5
28 changed files with 74 additions and 4 deletions
+39
View File
@@ -0,0 +1,39 @@
#include <stdio.h>
int main(){
int ch,c,m[10];
ch = c = 0;
printf("ascii symb - its num\n");
while((ch = getchar()) != EOF){
m[c] = ch;
c++;
if(c == 10){
for(c = 0; c < 10; c++){
switch(m[c]){
case '\n':
printf(" \\n - %3d ",m[c]);
break;
case '\t':
printf(" \\t - %3d ",m[c]);
break;
case ' ':
printf("\"%c\" - %3d ",m[c],m[c]);
break;
default:
if(m[c]<' '){
printf(" ^%c - %3d ", m[c] + 64, m[c]);
}else
if(m[c] == 127){
printf(" ^? %3d ",m[c]);
}else printf("%3c - %3d ",m[c],m[c]);
}
}
printf("\n");
c = 0;
}
}
return 0;
}