int hoofd()
{
// Declareer variabelen
int item_code;
vlottende hoeveelheid, eenheidsprijs, totaalprijs, korting, nettobedrag, belastingbedrag, totaalbedrag;
// Ontvang gebruikersinvoer
printf("Voer artikelcode in:");
scanf("%d", &item_code);
printf("Voer aantal in:");
scanf("%f", &hoeveelheid);
printf("Voer de eenheidsprijs in:");
scanf("%f", &eenheidsprijs);
printf("Voer korting in (in percentage):");
scanf("%f", &korting);
// Bereken de totale prijs
totale_prijs =hoeveelheid * eenheidsprijs;
// Bereken het kortingsbedrag
korting =(korting / 100) * totale_prijs;
// Bereken het nettobedrag
netto_bedrag =totale_prijs - korting;
// Bereken het belastingbedrag
belastingbedrag =(18 / 100) * netto_bedrag;
// Bereken het totaalbedrag
totaal_bedrag =nettobedrag + belastingbedrag;
// Druk de rekening af
printf("\n\nFACTUREERSYSTEEM\n\n");
printf("Artikelcode:%d\n", item_code);
printf("Aantal:%.2f\n", aantal);
printf("Eenheidsprijs:%.2f\n", eenheidsprijs);
printf("Korting (%%):%.2f\n", korting);
printf("Totale prijs:%.2f\n", total_price);
printf("Nettobedrag:%.2f\n", netto_bedrag);
printf("Belastingbedrag:%.2f\n", belastingbedrag);
printf("Totaalbedrag:%.2f\n", totaal_bedrag);
retour 0;
}
```