TOPIC
why wrong (5%) , what is the error?
mshrif asked 3 years ago
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
cout<<setprecision(3)<<fixed;
int a, b , c ;
double mult{0}, z{0} , s{0} ;
do{
cin>>a;
if(a==0 )
break;
cin>>b>>c;
s= (a * b) / (c/100.0) ; //make sure to put 100.0 NOT 100 we need double , s will be 0 always if it is 100
// cout<<s<<endl;
for(int i=1 ; mult <= (s) ; i++){
mult=z*z;
z+=.001;
}
cout<<static_cast<int>(z)<<endl;
z=0;
mult=0;
}while(true);
return 0;
}