public void onDrawFrame(GL10 gl) {
textureShaderProgram.useProgram();
ball.update(modelMatrix);
textureShaderProgram.setUniforms(projectionMatrix, modelMatrix);
ball.bindData(textureShaderProgram);
ball.render();
}
2
1
2
3
4
5
6
7
8
9
10
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10个
10
-module(solution).
-export([main/0]).
do_it(_X,0)->
true;
do_it(X,K) when K>0->
io:format("~p~n",[X]),
do_it(X,K-1).
kis(T)->
{ok,[K]}=io:fread("","~d"),
do_it(K,T),
kis(T).
main()->
{ok,[K]}=io:fread("","~d"),
kis(K).
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10个
10
答案 0 :(得分:-1)
您可以使用以下内容:
kis(T) ->
case io:fread("","~d") of
{ok,[K]} -> do_it(K,T), kis(T);
_ -> ok
end.
main()->
case io:fread("","~d") of
{ok,[K]} -> kis(K);
_ -> ok
end.