#include<stdio.h>
void main()
{
    int cost,sale,profit = 0;
    float percent =0;
    printf("Enter Cost = ");
    scanf("%d",&cost);
    printf("Enter Sale = ");
    scanf("%d",&sale);
    if(cost>sale)
    {
        profit=cost-sale;
        printf("Profit = %d\n",profit);
    }
    else
    {
        profit=sale-cost;
        printf("Profit = %d\n",profit);
    }
    percent=profit*100/cost;
    printf("Percent = %.2f ",percent);  
}