homework2-st

I.

1.for loop i >=0

2.x=[]

3.x=[0]

4.x=[3,2,5]

 

II.

1.

int cnt = 0;

if (x[i] == 0) {

  cnt = i;

}

...

 return cnt;

2.x=[]

3.x=[0]

4.x=[0,1]

posted @ 2016-03-06 22:08  hailuy  阅读(136)  评论(0编辑  收藏  举报