Guest User

Untitled

a guest
Aug 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Principal {
  4. public static void main(String[] args) {
  5. Scanner pegar = new Scanner(System.in);
  6.  
  7. System.out.println("Salario: ");
  8. float salario = pegar.nextFloat();
  9.  
  10. System.out.println("percentual de aumento: ");
  11. float aumento = pegar.nextInt();
  12.  
  13. aumento /= 100;
  14.  
  15. float aumentoTotal = salario * aumento;
  16.  
  17. salario += aumentoTotal;
  18.  
  19. System.out.println("O salario teve um aumento de " + aumentoTotal + " e totalizou o total de R$"+salario);
  20. }
  21. }
Add Comment
Please, Sign In to add comment