文字列を1文字ずつ確認して、空白でないなら一時退避し、空白なら退避しておいたものを1単語として確保する、という流れで「関数を使わずに」分割可能です。listのpushは分割そのものの処理とは無関係です。
javascript
JavaScript
1var str = "Please tell me the program of this problem";
2var list = [];
3var temp = "";
4for(var i=0;i<str.length;i++) {
5 var c = str[i];
6 if(c != ' ') {
7 temp += c;
8 }
9 else {
10 list.push(temp);
11 temp = "";
12 }
13}
14if(temp !== "") {
15 list.push(temp);
16}
17console.log(list);
https://paiza.io/projects/2cygmJIn_7AkfXO-4OLh0g
ruby
Ruby
1s = "Please tell me the program of this problem"
2temp = ""
3list = []
4for i in 0..s.length-1 do
5 c = s[i]
6 if c != " " then
7 temp += c
8 else
9 list.push(temp)
10 temp = ""
11 end
12end
13if temp.length > 0 then
14 list.push(temp)
15end
16puts list
https://paiza.io/projects/zWF_mZ2ug-Cz1lAPnHeUWw