1. Vedha has bought 40 kg of apple for Rs.140 per kg and 50 kg of pomegranate for Rs.120 per kg. Then she sold out all the stock with the selling price of Rs.150 per kg and Rs.140 per kg for apple and pomegranate respectively. Write a C program which computes the profit gained by her.
Answers
#include<stdio.h>
int main()
{
int CPA = 140; //CPA=> cost price of apples.
int SPA = 150; //SPA=> selling price of apples.
int CPP = 120;
int SPP = 140;
int profitA , profitP;
profitA = SPA-CPA;
profitP = SPP-CPP;
printf("profit made with apples is %d",profitA);
printf("profit made with pomegranates is %d",profitP);
return 0;
}
Vedha bought Apples and pomegranate
Cost price of one Apple = Rs 140
She bought 40 kg
So , Cost price of 40 kg = 40 × 140
= Rs. 5600
Selling price of one apple = Rs 150
so ,the selling price of 40 kg = 40 ×150
= 6000
Profit = S.p - C.p
= 6000 - 5600
= Rs. 400
Cost price of one pomegranate = Rs. 120
She bought 50 kg
Cost price of 50 kg = 50 × 120
= Rs 6000
Selling price of one pomegranate = Rs 140
So , the s.p of 50 Kg = 140 ×50
= Rs. 7000
Profit = S,P - C.P
= 7000 - 6000
=Rs. 1000
So the total cost price = 6000 + 5600
= 11600
Total profit = 400 + 1000
= 1400
profit % = Profit / c.p × 100
= 1400 / 11600 ×100
= 12.06 %