|
new program
having trouble with this little guy. always saying it needs a ; where the line doesnt end or a ) where the statement isnt even going to be complete. and pointers?
// Allows for user input
import java.util.Scanner;
public class Salary3
{
public static void main (String[] args);
{
// Declare Variables
String name;
double salary;
// Allows to read in from user input
Scanner scan = new Scanner (System.in);
// Prompt user for their name
Syste.out.println ("what is your name?");
// Read in the users name and stores it in the cariable name
name = scan/nextLine();
// Prompt the user for their age
Systems.out.println ("What is your age?");
// Read in the users age and stores it in the variable age
age = scan.netInt ();
// Prompt the user for their wanted salary
System.out.println ("How much money would you like to"
+ " make in a year");
// Read in the users salary and store it in the variable salary
salary = scan.nextDouble ();
// Output the wanted output
System.out.print ("\n" + name + " is " + age);
System.out.println (" years old and would like to make $" +
salary + " a year.);
} // End of main
} // End of Salary
|