I want to create a method which can sum the total price and create a receipt as example:
product : price € (user input)
product : price € (user input)
-------------------
Total €..
This my code.
public static void main(String[] args) {
    Scanner invoer = new Scanner(System.in);
    System.out.print("Wat is is het kortingsaantal(1...9)? ");
    int kortingsaantal = invoer.nextInt();
    System.out.print("Wat is het kortingspercentage (1...100)? ");
    int kortingspercentage = invoer.nextInt();
    System.out.print("Hoeveel artikelen heb je gekocht? ");
    int quantity = invoer.nextInt();
    for (int i = 1; i <= quantity; i++) {
        System.out.print("Omschrijving van artikel #" + i + ": ");
        String dummy = invoer.nextLine();
        String product = invoer.nextLine();
      
        
        System.out.print("   Prijs van " + product + ":");
        double Price = invoer.nextDouble();
 
    