#include <stdio.h>
#include <string.h>
int main(void)
{
char* strValue = "DSM123";
char resultValue[7] = { 0, };
int i;
int j;
for (int j = 1; j < 6; j++)
{
for (i = 0; i < 6; i++)
{
resultValue[(i + j) % strlen(strValue)] = strValue[i];
}
resultValue[6] = '\0';
printf("%s\n", resultValue);
}
return 0;
}
'언어 > c언어' 카테고리의 다른 글
naver_ (0) | 2017.11.12 |
---|---|
학생코드 (0) | 2017.11.02 |
네이버 문제 (0) | 2017.10.26 |
일어나서 풀어볼 문제 (0) | 2017.10.25 |
c언어 대 => 소 // 소 => 대 (0) | 2017.10.23 |