Pseudocode to check whether loss has incurred or profit based on selling price and cost price
1. START
2. DISPLAY "Enter the Selling Price - "
3. READ selling_price
4. DISPLAY "Enter the Cost Price - "
5. READ cost_price
6. IF selling_price > cost_price THEN
DISPLAY "Profit has incurred and is equal to "
DISPLAY selling_price - cost_price
ELSE
DISPLAY "Lost has incurred and is equal to "
DISPLAY cost_price - selling_price
END IF
5. STOP
No comments:
Post a Comment