Profit and Loss Program in C

how to find the profit and loss by using C programming language.

What is Profit?

Profit= Selling Price-Cost Price What is Loss? Loss= Cost Price- Selling Price

C Program to find the profit and Loss

int main()
    int num,cp,sp,profit;
    printf("Enter the number of products\n");
    printf("Enter the cost of 1 producs\n");
    printf("Enter the cost spent by the agency on 1 product\n");
    printf("The profit obtained is Rs.%d",profit);
    return 0;

In the above program if the profit is negative then its a loss.  ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping cart