Physics, asked by magaldeep2648, 3 days ago

Each Sunday, a newspaper agency sells x copies of a certain newspaper for Rs.a per copy. The cost to the agency of each newspaper is Rs.b . The agency pays a fixed cost for storage, delivery and so on of Rs.100 per Sunday. The newspaper agency wants to calculate the profit obtained on sundays. Can you please help them out by writing a python program to compute the profit given x, a and b. Input Format: Input consists of 3 integers --- x, a and b. X is the number of copies sold, a is the cost per copy and b is the cost the agency spends per copy. Output Format: Refer Sample Input and Output for exact formatting specifications.

Answers

Answered by dreamrob
0

Program:

x = int(input("Enter the number of copies sold : "))

a = int(input("Enter the cost of 1 copy of the newspaper : "))

b = int(input("Enter the cost spent on 1 copy of the newspaper : "))

profit = (x * a) - (x * b) - 100

print("Profit = Rs.", profit)

Output:

Enter the number of copies sold : 100  

Enter the cost of 1 copy of the newspaper : 10

Enter the cost spent on 1 copy of the newspaper : 6

Profit = Rs. 300

Similar questions