#include<stdio.h>
main()
{
int cp,sp,profitloss;
printf ("Enter the cost price and selling price of the item: ");
scanf ("%d %d", &cp, &sp);
profitloss=sp-cp;
if (sp>cp)
{
printf("Profit=%d",profitloss);
}
else if (cp>sp)
{
printf ("Loss=%d",profitloss);
}
else if(sp==cp)
{
printf ("No profit no loss");
}
}
The file can be downloaded at:
Download File
main()
{
int cp,sp,profitloss;
printf ("Enter the cost price and selling price of the item: ");
scanf ("%d %d", &cp, &sp);
profitloss=sp-cp;
if (sp>cp)
{
printf("Profit=%d",profitloss);
}
else if (cp>sp)
{
printf ("Loss=%d",profitloss);
}
else if(sp==cp)
{
printf ("No profit no loss");
}
}
The file can be downloaded at:
Download File
No comments:
Post a Comment
kiss on google ads if you are anonymous because your ip is trackable.thank you.
......from.admin