Knowee
Questions
Features
Study Tools

Vikram purchases an old scooter for Rs. 'A' and spends Rs. 'B' on repairing it. After the repairs, he sells the scooter for Rs. 'C'. Vikram wants to calculate the percentage gain he made on the transaction.Write a program to help Vikram compute the percentage gain based on the given values of 'A', 'B', and 'C'.Input format :The first line of the input consists of an integer A, which represents the purchase price of the old scooter.The second line of the input consists of an integer B, which represents the amount spent on repairing the scooter.The third line of the input consists of an integer C, which represents the selling price of the scooter.Output format :The output displays the percentage gain made by Vikram on selling the scooter rounded off to two decimal places.

Question

Vikram purchases an old scooter for Rs. 'A' and spends Rs. 'B' on repairing it. After the repairs, he sells the scooter for Rs. 'C'. Vikram wants to calculate the percentage gain he made on the transaction.Write a program to help Vikram compute the percentage gain based on the given values of 'A', 'B', and 'C'.Input format :The first line of the input consists of an integer A, which represents the purchase price of the old scooter.The second line of the input consists of an integer B, which represents the amount spent on repairing the scooter.The third line of the input consists of an integer C, which represents the selling price of the scooter.Output format :The output displays the percentage gain made by Vikram on selling the scooter rounded off to two decimal places.

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

Here is a Python program that can help Vikram compute the percentage gain:

# Taking inputs
A = int(input("Enter the purchase price of the old scooter: "))
B = int(input("Enter the amount spent on repairing the scooter: "))
C = int(input("Enter the selling price of the scooter: "))

# Calculating total cost
total_cost = A + B

# Calculating gain
gain = C - total_cost

# Calculating percentage gain
percentage_gain = (gain / total_cost) * 100

# Rounding off to two decimal places
percentage_gain = round(percentage_gain, 2)

# Printing the result
print("The percentage gain made by Vikram on selling the scooter is: ", percentage_gain)

This program first takes the purchase price, repair cost, and selling price as inputs. It then calculates the total cost by adding the purchase price and the repair cost. The gain is calculated by subtracting the total cost from the selling price. The percentage gain is then calculated by dividing the gain by the total cost and multiplying by 100. The result is then rounded off to two decimal places and printed.

This problem has been solved

Similar Questions

John buys a second hand car for Rs 180000 and spent Rs 20000 for repairing it. He sold it for Rs 220000 Find his gain %.Options :50%20%10%none

A man buys an article for Rs.27.50 and sells it for Rs.28.60. Find his gain percent.(A) 1% (B) 2% (C) 3% (D) 4%

A retailer purchases goods from a wholeseller for Rs.1800.The retailer bears additional expense of Rs.300 on carriage of goods by his servant and he sold the goods to the consumer Rs.2300.Find the percent gain?9%9.25%9.52%10%

A buys a scooter for Rs.6800 and spends Rs.1200 on its repairs. If he sells the scooter for 9200 his gain percent is.Question 14Answera.18b.14c.20d.15

Arun purchased a computer for Rs. 18,000 and sold it for Rs. 21,000. Find his gain percent.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.