C:\Users\ar114\Documents\NetBeansProjects\Exam1_CalebFontenot\src\main\java\com\calebfontenot\exam1_calebfontenot\TrianglePerimeter.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.calebfontenot.exam1_calebfontenot;
import java.util.Scanner;
@author
public class TrianglePerimeter {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int triEdge1, triEdge2, triEdge3;
System.out.print("Enter 3 edges for a triangle: ");
triEdge1 = input.nextInt();
triEdge2 = input.nextInt();
triEdge3 = input.nextInt();
System.out.println(((triEdge1 + triEdge2) > triEdge3) ||
((triEdge1 + triEdge3) > triEdge2) ||
((triEdge2 + triEdge3) > triEdge1) ?
"Input is valid" : "Invalid Input");
}
}