ok im from C++ but no starting java this is my attempt of the password protect program which you get three try at but for some reason it dosnt compile it just gets errors
import java.util.Scanner;
public class password {
public static void main(String args[]){
Scanner input = new Scanner(System.in);
double input1, input2, input3, password;
password = 12345;
System.out.println("Please enter the password to procceed: ");
input1 = input.nextDouble();
if(input1!=password){
System.out.println("sorry thats incorrect");
System.out.println("Please enter your password to procceed");
input2 = input.nextDouble();
}else{
System.out.println("Correct please procceed");
}
if(input2!=password){
System.out.println("sorry thats incorrect");
System.out.println("Please enter your password to procceed");
input3 = input.nextDouble();
}else{
System.out.println("Correct please procceed");
}
if(input3!=password){
System.out.println("sorry thats incorrect");
System.out.println("goodbye");
}else{
System.out.println("correct please procced");
}
}
}