write a program that calculates and displays the price before commission and after commission of 6%: The program prompt the user to enter
i. Quantity of products purchased
ii. Unit price.
#include <stdio.h>
int main()
{
int nunberOfProducts;
float price;
printf("Number of units: ");
scanf("%d", &nunberOfProducts);
for(int i=0;i<nunberOfProducts; i++)
{
printf("Before commission: ");
scanf("%f", &price);
double commision = price*6/100;
price-=commision;
printf("After commission: ");
printf("%f \n", price);
}
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C