Given Marked Price and Selling price as of a product. The task is to calculate the Discount Percentage applied to that product.
Input: M = 120, S = 100 Output: 16.66% Input: M = 1000, S = 500 Output: 50%
The mathematical formula to calculate the Discount Percentage for the product is:
Discount = Marked Price - Selling price Therefore, Discount Percentage = (Discount / Marked Price) * 100
Below is the program to find the discount percentage for a product:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Percentage increase in the cylinder if the height is increased by given percentage but radius remains constant
- Percentage increase in volume of the cube if a side of cube is increased by a given percentage
- Percentage increase in volume of the sphere if radius is increased by a given percentage
- Program to find the percentage of difference between two numbers
- Program to find the rate percentage from compound interest of consecutive years
- Find Selling Price from given Profit Percentage and Cost
- Find cost price from given selling price and profit or loss percentage
- Find the percentage change in the area of a Rectangle
- Overall percentage change from successive changes
- Loss when two items are sold at same price and same percentage profit/loss
- Percentage increase in the volume of cuboid if length, breadth and height are increased by fixed percentages
- Python | Percentage increase in the total surface area of the cuboid
- Python | Percentage increase in hemisphere volume if radius is increased
- Percentage change in Hemisphere volume if radius is changed
- Program to find parity
- Program to find amount of water in a given glass
- Program to find last digit of n'th Fibonnaci Number
- C++ program to find all numbers less than n, which are palindromic in base 10 and base 2.
- Program to find Normal and Trace of a matrix
- C program to find Decagonal Number
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.