#include<iostream>
using namespace std;
#include<conio.h>
int main()
{
float sp,tp,cp,cps;
cout<<"\nInput the total selling price of 15 itmes and total profit earned respectively";
cin>>sp>>tp;
cps=sp-tp;
cp=cps/15.0;
cout<<"\nThe cost price of one item is "<<cp;
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.
*/
}
using namespace std;
#include<conio.h>
int main()
{
float sp,tp,cp,cps;
cout<<"\nInput the total selling price of 15 itmes and total profit earned respectively";
cin>>sp>>tp;
cps=sp-tp;
cp=cps/15.0;
cout<<"\nThe cost price of one item is "<<cp;
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