Find Profit Or Loss
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter A current Price ");
scanf("%d",&a);
printf("Enter A Selling Price ");
scanf("%d",&b);
if(a>b)
{
c=a-b;
printf("loss..%d",c);
}
else if(b>a)
{
c=b-a;
printf("profit is..%d",c);
}
else if(a==b)
{
printf("Both Are Equal");
}
getch();
}
Output:
EmoticonEmoticon