Skip to content
Sign upLog in
← Back to Community

why It gives me "exit status 1" error. code is running

Profile icon
Hkmr89

import java.util.Scanner;

public class Main {
public static void main(String[] args) {

Scanner scan= new Scanner(System.in); System.out.println("Welcome to the patient portal"); System.out.println("Please enter your personal information"); System.out.println("Enter your first name"); String firstName= scan.next(); System.out.println("Enter your last name"); String lastName=scan.next(); System.out.println("Enter your email"); String email=scan.next(); System.out.println("Enter your street"); String street=scan.next(); System.out.println("Enter your city"); String city=scan.next(); System.out.println("Enter your state"); String state=scan.next(); System.out.println("Enter your zipcode"); int zipcode=scan.nextInt(); System.out.println("Enter your work phone number"); long workPhoneNumber=scan.nextLong(); System.out.println("Enter your personal phone number"); long personalPhoneNumber=scan.nextLong(); System.out.println("Enter your age"); int age=scan.nextInt(); System.out.println("Enter your height"); Double height=scan.nextDouble(); System.out.println("Enter your weight"); Double weight=scan.nextDouble(); System.out.println("Are you married?"); boolean isMarried=scan.nextBoolean(); String fullName=(firstName+","+lastName); String address=(street+","+city+","+state+" "+zipcode); String contacts=(workPhoneNumber+","+personalPhoneNumber+", email: "+email); System.out.println("Patint personal information"); System.out.println("Fullname:" +fullName); System.out.println("Adress: "+address); System.out.println("Contacts: "+contacts); System.out.println("Age: "+age); System.out.println("Height: "+height); System.out.println("Weight: "+weight+" pounds"); System.out.println("Married?: "+isMarried); //Enter your code here

}
}

Voters
Profile icon
Hkmr89