Thanks! :)
Charles Berry ccbe...@ucsd.edu writes:
zwz zhangweize at gmail.com writes:
Here is an example:
* array
** search
- example
#+BEGIN_SRC c
/* find score in scores
,* return the index if found or -1 */
int search(int scores[], int n, int score){
int i = 0;
--text follows this line--
Here is an example:
* array
** search
- example
#+BEGIN_SRC c
/* find score in scores
,* return the index if found or -1 */
int search(int scores[], int n, int score){
int i = 0;
for(; in; ++i) if(scores[i]==score) return i;
return -1;
}
zwz zhangweize at gmail.com writes:
Here is an example:
* array
** search
- example
#+BEGIN_SRC c
/* find score in scores
,* return the index if found or -1 */
int search(int scores[], int n, int score){
int i = 0;
for(; in; ++i) if(scores[i]==score) return i;