Infolinks - Earn Easy Money

Saturday, April 4, 2015

C++ Program to find that seller made profit or loss or how much he made

#include <iostream>
using namespace std ;
int main (  )
{
int cp , sp , loss , prof ;
cout <<" Enter the Cost Price ";
cin >> cp ;
cout <<" Enter the selling price ";
cin >> sp ;
if ( cp < sp )
{
prof = sp - cp ;
cout <<" Seller has made the Profit of = " << prof << " rupees " << endl ;
}
else if ( cp > sp )
{
loss = cp - sp ;
cout <<" Seller has made the lost = " << loss << " rupees " << endl ;
}
return 0 ;
}

No comments:

Post a Comment

Must drop your comments about post.