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
How many identifiers are there in c?
Explain what are the standard predefined macros?
What is the stack in c?
Where static variables are stored in c?
Explain is it better to bitshift a value than to multiply by 2?
write a program in c language to print your bio-data on the screen by using functions.
What does c mean before a date?
is it possible to create your own header files?
Do you know what are the properties of union in c?
Does c have circular shift operators?
what is the significance of static storage class specifier?
Tell us bitwise shift operators?
Where register variables are stored in c?
What is the use of a ‘ ’ character?
State two uses of pointers in C?