By what percentage of the regular price is this product discounted?
By what percentage of the regular price is this product discounted?
April 12, 2021 Comments Off on By what percentage of the regular price is this product discounted? Assignment Assignment helpProblem Statement
A shop sells a product whose regular price is
A
yen (Japanese currency) for
B
yen. By what percentage of the regular price is this product discounted?
Constraints
A
and
B
are integers.
1
≤
B
<
A
≤
10
5
Input
Input is given from Standard Input in the following format:
A
B
Output
Print the answer as a decimal.
Your answer will be judged as correct when its absolute or relative error from our answer is at most
10
−
2
.
Sample Input 1
100 80
Sample Output 1
20.0
If a product whose regular price is
100
yen is sold for
80
yen, it is discounted by
20
percent of the regular price.
Sample Input 2
7 6
Sample Output 2
14.285714285714285714
Sample Input 3
99999 99998
Sample Output 3
0.00100001000010000100
Ten questions like this.

Order Management
Discount

WHY CHOOSE US?
Time-tested quality
Master’s and Ph.D. writers
The expert team of editors
100% plagiarism-free papers
Set of Free features
Talk to your writer directly
Get FREE revision upon request
24/7 Customer Support Department
100% Money-Back guarantees
order now

Recent Post
Format and Features
- At least 275 words per page
- Free inquiry
- Free title page
- Free outline
- Free bibliography
- Free plagiarism report
- Free unlimited revisions
- Instant email delivery
- Flexible prices and discounts
Professional academic writer
