bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

P008.c (668B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* A shopkeeper offers 30% discount on purchasing an
      8 item whereas the other shopkeeper offers 2 successive
      9 discount of 20% and 10% for purchasing the same item.
     10 WAP to caompute and display the discounted price of the
     11 item by taking the price as input. */
     12 
     13 #include<stdio.h>
     14 int main() {
     15 	double mrp, shop1, shop2, temp;
     16 	printf("Enter the price : ");
     17 	scanf("%lf", &mrp);
     18 	shop1 = mrp * 0.70;
     19 	temp = mrp * 0.80;
     20 	shop2 = temp * 0.90;
     21 	printf("\nShopkeeper 1 price : %lf"
     22 			"\nShopkeeper 2 price : %lf",shop1,shop2);
     23 	return 0;
     24 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror