#include<stdio.h>
int main()
{
float
C,
S;
printf("Enter
cost price of the product: ");
scanf( "%f" ,&C);
printf("\nEnter
selling price of thr products: ");
scanf("%f",&S);
if(S>C)
printf("\nSeller
has made profit.\nProfit= %.3f",S-C);
else
printf("\nSeller
has incurred loss.\nLose= %.3f",C-S);
return 0;
}
|
If cost price and selling price of an item is input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.
Subscribe to:
Post Comments (Atom)
Thanks for writing this program. It really helps me.
ReplyDeleteTHANK YOU!!!!! =))))))
ReplyDeletenice workout
ReplyDelete