NOJ/15/main.c

16 lines
226 B
C
Raw Normal View History

2020-08-31 16:46:43 +00:00
#include <stdio.h>
int main(void){
double a = 0.0;
int i, count = 0;
do{
a = ++count;
for(i = 0;i < 5; i++){
a = (5.0/4.0 * a) + 1;
}
}while((a - (int)a) > 10e-6);
printf("%.0lf %d\n",a,count);
return 0;
}