You are on page 1of 1

Program loss and profit

#include <iostream>

using namespace std;

int main()

int a,sale,purchase,

cout<<"enter sale price";

cin>>sale;

cout<<"enter purchase price";

cin>>purchase;

(sale-purchase)

if(a<0)

cout<<"profit";

else

cout<<"loss";

return 0;

You might also like