The percentage must be the ammount of intNumber1 minus intNumber2.
The VAT of 17.5% must be inserted on intNumber2.
I'm not sure I fully understand why you are using integers for % calcualtions,
but try:
// sum is retail price
// PLUS // [not sure why ???]
// (promotional price multiplied by VAT)
intSum = intNumber1 + (intNumber2 * 0.175);
// why PLUS above ???
// should it be???: intSum = intNumber2 + (intNumber2 * 0.175);
// intMinus is retail price MINUS promotional price alone
intMinus = intNumber1 - intNumber2;
// not sure why VAT is not utilize here also for the calculation
// percentage saved
intperc = intMinus / intSum;
Your calculations don't make sense to me, but it will give what you write.
I've added some [questions] inside the brackets.
Thank you very much.
This works perfectly for me now!!!
Im very grateful THANKS again.
I know some of the functions dont make sence because i forgot to remove some testing i was doing.
The problem is now fixed and works perfectly as it should.
Ive been working for this assignment for 2 days now so i kind of lost my sences as i can see now from my post.
Thanks again.
I would suggest for future projects that you comment more
so that the english (?) makes as much sense as the code.
Makes it a little easier to spot problems when things go awry.
Bookmarks