백준
[10809] 알파벳 찾기
Jcoder
2018. 7. 14. 13:02
#include <iostream>#include <string>using namespace std;int main(){char s[101];cin >> s;for (char c = 'a'; c <= 'z'; c++){int i = 0;int res = -1;while (s[i] != '\0'){if (s[i] == c){res = i;break;}i++;}cout << res << " ";}return 0;}