Kennt sich jemand mit Java aus?

2 Antworten

import java.util.Scanner;

public class Guthabenentwicklung {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("Enter initial balance: ");
        double balance = scanner.nextDouble();
        System.out.print("Enter interest rate: ");
        double interestRate = scanner.nextDouble();
        for (int i = 1; i <= 10; i++) {
            balance *= (1 + interestRate / 100);
            System.out.printf("Year %d: %.2f%n", i, balance);
        }
    }
}

Woran hakt es denn? Was sind deine/eure bisherigen Lösungsansätze (mit Code)?

Woher ich das weiß:Studium / Ausbildung – Informatikstudent