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
Answers were Sorted based on User's Feedback
Answer / jiaul haque sabuj
main()
{
float X,Y,Z,A;
printf("Please Enter the Total Price Of 15 Items : ");
scanf("%f",&X);
printf("Please Enter the total profit Earned on them : ");
scanf("%f",&Y);
Z=(X-Y)/15;
printf("The Cost Price of One Item is : %.2f",Z);
}
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / 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 |
c language interview questions & answer
How can I increase the allowable number of simultaneously open files?
how to exchnage bits in a byte b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3 please mail me the code if any one know to rajeshmb4u@gmail.com
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
Mention four important string handling functions in c languages .
In a switch statement, explain what will happen if a break statement is omitted?
1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x=4; While(x==1) { X=x-1; Printf(“%d”,x); --x; } }
write a program that prints a pascal triangle based on the user input(like how many stages) in an efficient time and optimized code?
What is typedef example?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What are the types of i/o functions?
write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1