#include <stdio.h> int main() { float cp,sp; printf("Enter The Cost Price : "); scanf("%f",&cp); printf("Enter The Selling Price : "); scanf("%f",&sp); float p,l; p=(sp-cp); l=(cp-sp); if(cp>sp){ printf("\nLoss = %f",l); } if(sp>cp){ printf("\nProfit = %f ",p); } if(sp==cp){ printf("\nNo Loss , No Profit"); } return 0; }