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



if the total selling price of 15 items and the total profit earned on them is input through the ke..

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

if the total selling price of 15 items and the total profit earned on them is input through the ke..

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

Post New Answer

More C Interview Questions

What is the relation between # and include<stdio.h>

5 Answers   HCL,


. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program to print a report which employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose total salary is more than 10,000.

1 Answers  


What is page thrashing?

0 Answers  


What is the use of a static variable in c?

0 Answers  


What are the advantages of using macro in c language?

0 Answers  






write a programming in c to find the sum of all elements in an array through function.

0 Answers  


What is equivalent to ++i+++j?

0 Answers  


what are the stoge class in C and tel the scope and life time of it?

2 Answers   Tech Mahindra,


Why c is called a mid level programming language?

0 Answers  


can we define a function in structure?

2 Answers  


What is malloc() function?

0 Answers  


Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??

4 Answers  


Categories