TOPIC

Why it's showing 5% wrong

MSM Robin asked 1 year ago

int laps,signs; double result=0.0, i; cin>>laps>>signs;

for( i=0.1; i<=0.8; i+=0.1){
    result =(double) (laps*signs*i);
    cout<<(int)ceil(result)<<" ";
}
    result =(double) (laps*signs*0.9);
    cout<<(int)ceil(result)<<endl;

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.