Q1 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.
Program: 69
If cost price and selling price of an item is input through the keyboard, write a C program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.
Output:
Enter the cost price of an item: 100
Enter the selling price of an item: 120
We earn 20.00 profit by selling item.