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
What do you know about the use of bit field?
What is structure in c explain with example?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
Explain how can type-insensitive macros be created?
How can I copy just a portion of a string?
What are the types of data files?
Explain what is dynamic data structure?
What is difference between %d and %i in c?
Can stdout be forced to print somewhere other than the screen?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
What is a #include preprocessor?
What is queue in c?
What is a lookup table in c?
What are the 4 types of programming language?
What are inbuilt functions in c?