My Program stops
Posted: Wed Apr 17, 2019 7:17 pm
Here is a snippet my code. It stops at some random point and i have no idea why. No error comes up it just says the code has been finished. The code:
case "Side":
//The length of the Side
System.out.println("Input the length of your side.");
double sideA = sc.nextDouble();
//The value of the angle
System.out.println("Now the value of the angle.");
double angleA = sc.nextDouble();
//The Relation to the angle
System.out.println("What is your side in relation to the angle? ex. 'Opposite'");
//My code stops here and idk why
String typeSideB = sc.nextLine();
switch (typeSideB) {
case "Side":
//The length of the Side
System.out.println("Input the length of your side.");
double sideA = sc.nextDouble();
//The value of the angle
System.out.println("Now the value of the angle.");
double angleA = sc.nextDouble();
//The Relation to the angle
System.out.println("What is your side in relation to the angle? ex. 'Opposite'");
//My code stops here and idk why
String typeSideB = sc.nextLine();
switch (typeSideB) {