Skip to content

Instantly share code, notes, and snippets.

@jimywork
Last active August 22, 2017 17:46
Show Gist options
  • Save jimywork/e9d3ca51690504e7b9d80da1e8081f62 to your computer and use it in GitHub Desktop.
Save jimywork/e9d3ca51690504e7b9d80da1e8081f62 to your computer and use it in GitHub Desktop.
Lista de Exercícios Java
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