fork download
  1. import java.util.*;
  2.  
  3. class Ideone
  4. {
  5. public static void main (String[] args)
  6. {
  7. Scanner s = new Scanner(System.in);
  8. int age = Integer.parseInt(s.nextLine());
  9. float salary = Float.parseFloat(s.nextLine());
  10. String name = s.nextLine();
  11.  
  12. System.out.println("Hello "+name);
  13. System.out.println("You are "+age+" years old.");
  14. System.out.println("Your current salary is "+salary);
  15. salary = salary + 100;
  16. System.out.println("Now you have earned Rs.100 extra on your salary ");
  17. System.out.println("Your current salary is "+salary);
  18. }
  19. }
Success #stdin #stdout 0.06s 321344KB
stdin
22
9999
Narendra
stdout
Hello Narendra
You are 22 years old.
Your current salary is 9999.0
Now you have earned Rs.100 extra on your salary 
Your current salary is 10099.0