Hey guys. I'm working on this program that asks the user for a price, then a discount rate then outputs the final sale price on a table format. However, the math is wrong for the sale price.

My code is as follows:

Code:

#include <stdio.h>
#include <stdlib.h>
int main()
{
system("cls");
//Declarations
float sales[4][2];
int i = 0; //First Item
int j = 0; //First Category
//j=0 is original price
//j=1 is discounted rate
//j=2 is sale price
printf("\n\n\t\tWelcome to Haakon's dicount caluclator!");
printf("\n\n");
for(i=0; i<5; i++)
{
//Input
//sales[i][j] where i is item and j is category in a for loop
printf("\n\tPrice for Item #%d:\t$", i+1);
scanf(" %f", &sales[i][0]);
printf("\tDiscount for Item #%d:\t%%", i+1);
scanf(" %f", &sales[i][1]);
//Process
sales[i][2] = sales[i][0] * (1 - (sales[i][1] / 100));
}
//Output
printf("\n\n");
printf("\t\tPrice \t\tDiscount \t\tSale Price\n");
for(i=0; i<5; i++)
{
printf("Item #%d\t\t$%.2f \t\t%%%.0f \t\t$%.2f\n", i+1, sales[i][0], sales[i][1], sales[i][2]);
}
return 0;
}

I'm trying out three different scenarios:

sales[i][0]=$10; sales[i][1]=%25; sales[i][2]=$7.5

Instead I get $15.50

sales[i][0]=$15.50; sales[i][1]=%12; sales[i][2]=$13.64

Instead I get $15.50

sales[i][0]=$42.50; sales[i][1]=%10; sales[i][2]=$38.25

Anyone got any ideas?