
#include <stdio.h>
#include <math.h>
double incr = 3;
double calculate(double start,double end) {
if (start >= end) {
return sqrt(end);
}
return sqrt(start + calculate(start+incr,end));
}
int main() {
printf("%.*f\n",10, calculate(3,99));
return 0;
}
#include <math.h>
#include <stdio.h>
int main()
{
double val = 0;
for (int i = 99; i >= 3; i -= 3)
{
val = sqrt(i + val);
}
printf("%g\n", val);
return 0;
}