Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Archives
Today
Total
관리 메뉴

게임 개발 메모장

4. 영어 단어 복구 본문

문제 해결력 훈련

4. 영어 단어 복구

Dev_Moses 2024. 1. 8. 15:58

 

#include <iostream>
#include <string>

using namespace std;

int main()
{
	string str;
	getline(cin, str);

	char Res[101] {0,};
	int Position = 0;

	for (int idx = 0; idx < str.size(); ++idx)
	{
		if (str[idx] == ' ')
		{
			continue;
		}

		if ((str[idx] >= 65) && (str[idx] <= 90))
		{
			Res[Position] = str[idx] + 32;
		}
		else
		{
			Res[Position] = str[idx];
		}

		++Position;
	}

	Res[Position] = '\0';

	cout << Res;
}

'문제 해결력 훈련' 카테고리의 다른 글

6. 자릿수의 합  (1) 2024.01.08
5. 모두의 약수  (0) 2024.01.08
3. 숫자만 추출  (2) 2024.01.08
2. 나이 계산  (0) 2024.01.07
1. 나이 차이  (0) 2024.01.07