#include <stdio.h>
int main() {
float p,s;
printf("Enter purchase & selling amount:");
scanf("%f %f",&p,&s);
if(p<s)
{
printf("Profit=%.2f",s-p);
}
else if(p>s)
{
printf("Loss=%.2f",p-s);
}
else
{
printf("No profit or loss");
}
}
Quote 53: Ethical earning is key. Quote 52: Grades matter, but your skills, curiosity, and consistency matter even more. Quote 51: Be curio...
No comments:
Post a Comment