Hi !
New to the boards here. I am in wk 2 of a java programming class. We had to submit an assignment and this is what I did:
// checkpoint 2.2: WeeklyPay1.java
// Printing name of employee and weekly pay amount.
import java.util.scanner; // program uses class scanner
public class WeeklyPay1
{
// main method begins execution of Java application
public static void main( String args[] );
{
// create Scanner to obtain input from command window
Scanner input = new scanner( System.in );
int name1; // Name Of Employee
int numberhrs; // number of hours worked
int hourlypay; // pay per hour
int sum; // numberhrs * hourlypay
System.out.print( " Enter Name Of Employee: " ); // prompt
name1 = input.nextInt(); // read first name from user
System.out.print( " Enter Number Of Hours Worked: "); // prompt
numberhrs = input.nextInt(); // read number of hours worked from user
System.out.print( " Enter Hourly Pay: " ); // prompt
hourlypay = input.nextInt(); // read hourly pay
sum = numberhrs * hourlypay; // multiply numbers
System.out.printf( "Sum is $d\n", Name employee ); // display employee name and weekly pay amount
} // end method main
} // end class WeeklyPay1
and this is the error messsage I am getting:
C:\Documents and Settings\Sabrina\Desktop\WeeklyPay1.java:29: ')' expected
System.out.printf( "Sum is $d\n", sum, employee name ); // display sum; name of employee
^
1 error
Tool completed with exit code 1
Please help!
thanks
sabrina