Răspuns:
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int ziua=1;
float d_zi=10, accelerare=0.1, d_totala=10;
while ( d_zi < 20) {
d_zi+=d_zi*accelerare;
d_totala+=d_zi;
ziua++;
}
printf(" Va parcurge 20 km in ziua... %d ", ziua);
d_zi=10;
d_totala=0;
ziua=1;
while ( d_totala < 100 ) {
d_zi+=d_zi*accelerare;
d_totala+=d_zi;
ziua++;
}
printf("\n Va parcurge 100 km peste... %d ...zile", ziua);
return 0;
}