Assignment #75 Right Triangle Checker
Code
///Name: Morgan Kaplan
///Period: 5
///Project Name: Right Triangle Checker
///File Name: RTC.java
import java.util.Scanner;
public class RTC
{
public static void main( String[] args)
{
Scanner momo= new Scanner(System.in);
int S1, S2, S3;
double T;
System.out.println(" Enter 3 numbers bro");
System.out.println(" Number 1: ");
S1=momo.nextInt();
do
{
System.out.println(" Number 2: ");
S2=momo.nextInt();
if (S1 > S2)
{
System.out.println(" Yo, " + S1+ " is bigger than " + S2 +". Yo second number has gotta be smaller than yo first dawg. Enter another number.");
}
}
while ( S2< S1);
do
{
System.out.println(" Number 3:");
S3=momo.nextInt();
if ( S2> S3)
{
System.out.println(" Dawwwggg you " + S2 + " is bigger than your " + S3 + ". Yo can't do that. Try again.");
}
}
while ( S3 < S2);
System.out.println(" Your three Numbers are " + S1 + ", " + S2 + ", " + S3 + ".");
if ( (((S1)^2) + ((S2)^2))== ((S3)^2) )
{
System.out.println( "Yo got yoself a triangle!");
}
else
{
System.out.println( "Yo aint got yo self a triangle.");
}
}
}
Picture of Output