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 / 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 |
Post New Answer View All Answers
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
Explain the meaning of keyword 'extern' in a function declaration.
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Explain union.
What is the difference between array_name and &array_name?
When should we use pointers in a c program?
Do you know the difference between exit() and _exit() function in c?
What is the auto keyword good for?
Why calloc is better than malloc?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What are different types of operators?
What do you mean by keywords in c?
Why is C language being considered a middle level language?
Explain goto?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?