if the total selling price of 15 items and the total profit
earned on them is input through the keyboard, write a program
to find the cost price of one of the item
Answer Posted / gagan kumar
void main()
{
int sell_pr, profit, cost_pr, cost_pr_one_item ;
clrscr();
printf(“Please enter the selling price of 15 items:”);
scanf(“%d”, &sell_pr);
printf(“Please enter the profit earned on 15 items:”);
scanf(“%d”, &profit);
cost_pr = sell_pr – profit;
cost_pr_one_item = cost_pr/15;
printf(“Cost price of one item is %d”, cost_pr_one_item);
getch();
}
Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
Does c have circular shift operators?
What is array in c with example?
Explain union. What are its advantages?
Why we use void main in c?
What is the modulus operator?
Explain can you assign a different address to an array tag?
How do I copy files?
Does c have enums?
How to compare array with pointer in c?
What is union in c?
What is ambagious result in C? explain with an example.
Write a program to reverse a string.
how do you programme Carrier Sense Multiple Access
What is sizeof int?
What would be an example of a structure analogous to structure c?