Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Practicer {
- //private int score = 0; ?? why can't?
- public static void main(String[] args) {
- int score = 0;
- int[] sides = new int[3];
- Scanner cin = new Scanner(System.in);
- while(cin.hasNext()){
- for(int i=0;i<3;i++){
- sides[i] = cin.nextInt();
- }
- Arrays.sort(sides);
- if((sides[0]+sides[1]) > sides[2]){
- score++;
- }
- }
- System.out.println(score);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement