Back To C Basics Index
to calculate 10 % discount on price , price is multiplied with 0.1
//program to input price of an item from user and calculate discount as 10 percent on the price #include
#include
void main() { float price,discount; clrscr(); printf("enter price of the item "); scanf("%f",&price); discount=0.1f*price; printf("10 percent discount is %f",discount); getch(); }