Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. package com.company;
  2. public class Main {
  3. public static void main(String[] args) {
  4. int x = 10000;
  5. for(int i = 0; i < 10; i++){ //de 10 ori parcurgem partea din cod intre acolade
  6. x = x + (x / 100) * 5; // aflam 5% din suma
  7. }
  8. System.out.println("Final va achita: " + x + " lei. ");
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement