Computer Science, asked by rachnanigam, 11 months ago

Name TANISHQ
Expt. No.
Date.........
Page No......
Write a program to create a class employee and and input the salary of employee (Sal) number of days extra worked (days) and nate grenzland (Crata ). calculate! the wages of the employee (salary + extradays * rate perday)
and print all details

Answers

Answered by neelgreevG
10

Answer:

class employee

{

static void main()

{

Scanner br= new Scanner();

System.out.println("Input name of employee");

String name= br.nextLine();

System.out.println("Input salary");

int sal=br.nextInt();

System.out.println("Input no. of days worked");

int days= br.nextInt();

System.out.println("Input the rate");

double rate= br.nextDouble();

double wage=Sal+days*rate;

System.out.println("The wage of " + name+ "is"+ wage); //fix the details in output by yourself can't understand it properly sorry

}

}

Similar questions