TOPIC

Dica do 5%

tiago abilio asked 8 months ago

include include

int main() {

int n1,n2,constan=10,i,valores[9];
double nn1,nn2,resul,noventa;

scanf("%d%d",&n1,&n2);

nn1 = (double)n1;
nn2 = (double)n2;

noventa = (nn1*nn2*90)/100;

for(i=0;i<9;i++){
    resul = (noventa*constan/90);
    valores[i] = ceil(resul);
    constan+=10;
}
for(i=0;i<9;i++){
    if(i==8){
        printf("%d\n",valores[i]);
    }else
    {
        printf("%d ",valores[i]);
    }
}

return 0;

}

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

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