-
2743) 단어 길이 재기 c++백준코딩일기 2020. 11. 24. 11:06
풀이 )
1. string 으로 문자열을 입력받아서
2. 입력받은 문자열.length() 를 이용하여 단어의 길이를 출력
코드 )
#include <iostream> using namespace std; string input; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> input; cout << input.length(); }
'백준코딩일기' 카테고리의 다른 글
10824) 네 수 c++ (0) 2020.12.01 11655) ROT13 c++ (0) 2020.11.24 10820) 문자열 분석 c++ (0) 2020.11.24 10809) 알파벳 찾기 c++ (0) 2020.11.23 17298) 오큰수 c++ (0) 2020.11.19