- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEstudarFor.java
More file actions
Latest commit
22 lines (15 loc) · 597 Bytes
/
Copy pathEstudarFor.java
File metadata and controls
22 lines (15 loc) · 597 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
publicclassEstudarFor {
privatevoidhorasDeEstudo (intqtdHoras){
for(inthorasNecessarias = 4 ; horasNecessarias > qtdHoras ; horasNecessarias--){
if (horasNecessarias > qtdHoras){
inttantasHoras = horasNecessarias - qtdHoras;
System.out.println("Você precisa estudar mais " + tantasHoras +" hora(s).");
}
}
System.out.println("Parabéns vc atingiu a meta!");
}
publicstaticvoidmain(String[] args) {
EstudarForestudar = newEstudarFor();
estudar.horasDeEstudo(2);
}
}