Advertisement
ppupil2

chien 10/03

Mar 9th, 2020
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.15 KB | None | 0 0
  1.     for (int i = n-1; i>=0; i--) {
  2.         if (a[i] > 0) {
  3.             check = a[i];
  4.             break;
  5.         }
  6.         if (i == 0) {
  7.             check = -1;
  8.         }
  9.     }
  10.    
  11.     return(check);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement