#include <iostream>
#include<iomanip>
using namespace std;
class profit
{
public:
float p;
profit()
{
p=0;
}
profit(int income,int expenses)
{
p=((float(income)/float(expenses))*100)-100;
cout<<fixed<<setprecision(2)<<p<<"%";
}
};
int main() {
int i,n;
cin>>i>>n;
profit share(i,n);
return 0;
}
#include<iomanip>
using namespace std;
class profit
{
public:
float p;
profit()
{
p=0;
}
profit(int income,int expenses)
{
p=((float(income)/float(expenses))*100)-100;
cout<<fixed<<setprecision(2)<<p<<"%";
}
};
int main() {
int i,n;
cin>>i>>n;
profit share(i,n);
return 0;
}
This is 88% correct. In test case 9, it failed
ReplyDelete88% me too
ReplyDeleteits coming 100% for me :)
ReplyDeleteno its coming 100% for me :)
ReplyDelete