C Programming- A program that calculates and displays the price before commission and after commission of 6%: The program prompt the user to enter
Saturday, 31 March 2018
A program that calculates and displays the price before commission
and after commission of 6%: The program prompt the user to enter
i. Quality of products purchased
ii. Unit price.
Complied On : Code::Blocks 17.0
Save :- .c file (C Program)
Created By :- Lukas Yooma
#include <stdio.h>
int quantity, price, b4;
float commision;
main()
{
printf("\nENTER THE QUANTITY OF THE PRODUCTS PURCHASED ?\n");
scanf("%d", &quantity);
printf("WHAT IS THE UNIT PRICE \n");
scanf("%d", &price);
b4=(quantity*price);
printf(" THE PRICE BEFORE COMMISION %d\n",b4);
commision=(b4-0.06*b4);
printf("\nTHE PRICE AFTER THE COMMISION OF 6 PERCENT %f\n",commision);
main(0);
}
Thank you For reading please leave your comments for any queries