DevJourney · code I wrote while learning

README.md

Price Processor

Single File Programming Question

Problem Statement

Ella is managing her expenses and wants to calculate her item prices without applying any tax. She enters a array of item prices, which are written into a file named prices.txt.The program then reads these prices from prices.txt, writes them as they are to a new file named tax.txt, and displays the same prices in the console, without applying any tax. The final output will match the input prices exactly, be displayed on the console, and be saved in tax.txt.

Input:

format :

The first line of input consists of an integer N, representing the number of items Ella wants to process.

The next n lines consist of N double values, representing the price of an item.

Output:

format :

The output displays a double value, representing the price, each with two decimal places on the next lines.

Refer to the sample output for formatting specifications.

Code constraints : In this scenario, the test cases fall under the following constraints:

1 ≤ N ≤ 10

Sample test cases :

Input 1:

1
140.50
Output 1 :
140.50
Input 2 :
4
12.21
58.62 
63.43
78.14
Output 2 :
12.21
58.62
63.43
78.14