Wap to input basic salary and name of an employee. Calculate the tax and gross salary. Display details of the employee with message.
Plz someone answer. I need it urgently. I've got 2 more questions. My teacher doesn't explain properly so my basics in Java Scanner class is not clear.
Answers
Answered by
1
Answer:
import java.util.*;
class Salary
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("enter name & salary");
String n=sc.nextLine();
int s=sc.nextInt();
int t=2/100;
s=t*s;
System.out.println("name of the employee is" + n);
System.out.println("salary of the employee is" + s);
}
}
hope it helps!!!
Similar questions
Math,
5 months ago
History,
5 months ago
Social Sciences,
11 months ago
English,
11 months ago
Hindi,
1 year ago