diff options
Diffstat (limited to 'comp/work/8/ascii_word.c')
-rwxr-xr-x | comp/work/8/ascii_word.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/comp/work/8/ascii_word.c b/comp/work/8/ascii_word.c new file mode 100755 index 0000000..ba9fa95 --- /dev/null +++ b/comp/work/8/ascii_word.c @@ -0,0 +1,11 @@ +#include<stdio.h> +#include<string.h> +int main(){ + char sentence[1000]; + + fgets(sentence, 1000, stdin); + for (int i = 0; i < strlen(sentence) - 1; i++){ + printf("%d \0 ", (int)sentence[i]); + } + printf("\n"); +} |