Last active
August 22, 2017 17:46
-
-
Save jimywork/e9d3ca51690504e7b9d80da1e8081f62 to your computer and use it in GitHub Desktop.
Lista de Exercícios Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class Main { | |
public static void main(String[] args) { | |
double porcentagem = 0.015; | |
double salario = 1000; | |
for(int i = 2005; i <= 2017; i++) { | |
if(i >= 2007) { | |
porcentagem = porcentagem * 2; | |
salario = salario + (salario * porcentagem); | |
} else { | |
salario = salario + (salario * porcentagem); | |
} | |
} | |
System.out.println(salario); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment