P008.c (531B)
1 /* A shopkeeper offers 30% discount on purchasing an 2 item whereas the other shopkeeper offers 2 successive 3 discount of 20% and 10% for purchasing the same item. 4 WAP to caompute and display the discounted price of the 5 item by taking the price as input. */ 6 7 #include<stdio.h> 8 int main() { 9 double mrp, shop1, shop2, temp; 10 printf("Enter the price : "); 11 scanf("%lf", &mrp); 12 shop1 = mrp * 0.70; 13 temp = mrp * 0.80; 14 shop2 = temp * 0.90; 15 printf("\nShopkeeper 1 price : %lf" 16 "\nShopkeeper 2 price : %lf",shop1,shop2); 17 return 0; 18 }