Previous Next
0 / 5
Module DEMO-32-54DEMO-C-32

Original Price Calculation

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

A tax of 15% is applied to items sold in a store. Given the total price, including tax, for an item, find the original price of the item. You should derive a simple formula to calculate the original price from the price with tax by yourself!

โ€‹

Constraints

p is positive real number

Input Format

One real value p represents the item price including tax

Output Format

The original price of the item shown as follows:

original price = x

where x is calculated from p, and x is shown with two decimal places.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
5
original price = 4.35
Sample #2
Public sample
12.5
original price = 10.87

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings