728x90
반응형
문제 : https://codeup.kr/problem.php?id=1752
20글자 이하의 한 단어가 입력되면 뒤집어 출력하시오.
예) love → evol
# include <stdio.h>
# include <string.h>
int main()
{
char arr[21];
gets(arr);
int i,num=0;
for(i = strlen(arr)-1; i>=0; i--)
{
printf("%c",arr[i]);
}
return 0;
}
728x90
반응형
최근댓글