I need to wright a program that asks for the price of several items and adds tax to them.
So item 1, 2 and 3 will get 21% taxes added. and Items 4, 5 and 6 wil get 9% taxes added.
as i am a beginner and started to wright the program I bumped into the first problem. it keeps saying "Expected declaration" and i have no idea what i've done wrong.
i really just started with it so it isnt much, but its honest work.
the problem occurs under void bedragartikel(): at the { sign
bedragartikel; <-- DO NOTHING STATEMENT. Use () to invoke it: (line 14)
bedragartikel();
line 34: no ; on this. The header (up top) has a ; but where the function body/code goes does not.
turn on warnings, read them, fix them.
if (3 < artikelcode1 <= 6)
you can't do this, c++ does not grok math.
you have to say it with boolean logic:
if( artikelcode1 <= 6 && artikelcode1 > 3)
<math.h> is a C language header. use <cmath> in c++ progarms.