#K91147. Discounted Price Calculator
Discounted Price Calculator
Discounted Price Calculator
In this problem, you are given a list of products along with their original prices and discount percentages. Your task is to compute the final discounted price for each product. The formula to calculate the discounted price is given by $$ discounted_price = original_price \times \left(1 - \frac{discount_percentage}{100}\right) $$. The output for each product should display the product name and its discounted price rounded to two decimal places.
Note: Make sure to read from standard input (stdin) and print your answers to standard output (stdout).
inputFormat
The first line of input contains an integer N, representing the number of products. Each of the next N lines contains the product name (a string without spaces), its original price (a float), and the discount percentage (a float) separated by spaces.
outputFormat
For each product, output a line containing the product name followed by its final discounted price. The discounted price must be rounded to two decimal places.## sample
3
Laptop 1000 20
Smartphone 500 10
Tablet 300 5
Laptop 800.00
Smartphone 450.00
Tablet 285.00
</p>