Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = n-1; i>=0; i--) {
- if (a[i] > 0) {
- check = a[i];
- break;
- }
- if (i == 0) {
- check = -1;
- }
- }
- return(check);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement