68 774
Assignments Done
Successfully Done
In January 2019

Answer to Question #58162 in C for lovemore kateya

Question #58162
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.
Expert's answer
#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;

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions