#include<iostream>
using namespace std;
#include<conio.h>
int main()
{
int cprice,sprice,loss,profit;
cout<<"Enter Cost Price : RS ";
cin>>cprice;
cout<<"Enter Selling Price of an item : RS ";
cin>>profit;
if(cprice>sprice)
{
loss=cprice-sprice;
cout<<"You have made LOSS. Your Loss is RS " << loss;
}
else if(sprice>cprice)
{
profit=sprice-cprice;
cout<<"You have gain PROFIT. Your Profit is RS " << profit;
}
else if(sprice=cprice)
{
cout<<"You have neither Loss nor Profit";
}
getch();
return 0;
Understandable C and C++ programming tutorials, compiler reviews, source code, tips and tricks.
*/
}
using namespace std;
#include<conio.h>
int main()
{
int cprice,sprice,loss,profit;
cout<<"Enter Cost Price : RS ";
cin>>cprice;
cout<<"Enter Selling Price of an item : RS ";
cin>>profit;
if(cprice>sprice)
{
loss=cprice-sprice;
cout<<"You have made LOSS. Your Loss is RS " << loss;
}
else if(sprice>cprice)
{
profit=sprice-cprice;
cout<<"You have gain PROFIT. Your Profit is RS " << profit;
}
else if(sprice=cprice)
{
cout<<"You have neither Loss nor Profit";
}
getch();
return 0;
/* Letuswithc:
this page is designed to help you learn C or C++.Understandable C and C++ programming tutorials, compiler reviews, source code, tips and tricks.
*/
}
No comments:
Post a Comment