consider a fruit store where an apple is Rs.35 each or 4 for Rs.100. write a program to scan and get results as the correct total price for an entire shopping cart based on the per-unit prices or the volume prices as applicable.
Answers
Answered by
0
Answer:
Let the cost of an orange =Rsx
And the cost of an apple =Rsy
According to the question,
5x+3y=35
And 2x+4y=28
⇒x+2y=14
By cross-multiplication method, we have
⇒
−42+70
x
=
−35+70
y
=
10−3
1
⇒
28
x
=
35
y
=
7
1
I II III
On taking I and III ratio, we get
⇒
28
x
=
7
1
⇒x=4
On taking II and III ratio, we get
⇒
35
y
=
7
1
⇒y=5
Hence, the cost of an orange is Rs. 4 and cost of an apple is Rs. 5
Similar questions