Thread: new program
View Single Post
Old 08-31-2012, 01:58 AM   PM User | #1
royb305
New to the CF scene

 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
royb305 is an unknown quantity at this point
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
royb305 is offline   Reply With Quote