12345678910111213141516171819202122232425262728293031 |
- #include <stdio.h>
- #include <string.h>
- main()
- {
- int i;
- char msg[25];
- printf("Type up to 25 character and then press Enter...\n");
- for (i = 0; i < 25; i++)
- {
- msg[i] = getchar();
- if (msg[i] == '\n')
- {
- i--;
- break;
- }
- }
- putchar('\n');
- for (; i >=0; i--)
- {
- putchar(msg[i]);
- }
- putchar('\n');
- return(0);
- }
|