Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void validateMarks(int [] array){
- int [] array1 = new int[5];
- for(int i = 0; i<array.length; i++){
- if(array[i] < 0 || array[i] > 100){
- int f= array1.length-1;
- array1[f] = array[i];
- array1[f] = 0;
- f--;
- }
- else if(array[i] > 0 || array[i] < 100){
- array1[i] = array[i];
- }
- System.out.println(array1[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement