Given two numbers a and b, where ‘b’ is incremented or decremented by some percentage of ‘a’. The task is to find out that percentage.
Input: a = 20, b = 25 Output: 25% Difference between 20 and 25 is 5, which is 25 % of 20. (+ve sign indicate increment) Input: a = 25, b = 20 Output: -20% ( -ve sign indicate decrement)
Formula to calculate percentage:
(Percentage2 – Percentage1) * 100 / (Percentage1)
- Program to find the Discount Percentage
- Program to find the maximum difference between the index of any two different numbers
- Program to find the rate percentage from compound interest of consecutive years
- Find Selling Price from given Profit Percentage and Cost
- Find the minimum difference between Shifted tables of two numbers
- Program to find smallest difference of angles of two parts of a given circle
- Find cost price from given selling price and profit or loss percentage
- Program to find LCM of two numbers
- Program to find GCD or HCF of two numbers
- Program to find LCM of 2 numbers without using GCD
- Program to find first N Iccanobif Numbers
- Program to find sum of first n natural numbers
- Program to find LCM of two Fibonnaci Numbers
- Program to find sum of prime numbers between 1 to n
- Program to find GCD of floating point numbers
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.