huhu

 avatar
NguyenAnhQuan
c_cpp
7 months ago
391 B
2
Indexable
Never
#include <iostream>
#include <iomanip>
using namespace std;

// toikhongmuonhocbichvantoikhongmuonhocbichvan



#include <math.h>

float calculate(int n)
{
	if (n == 1) return 1;

	return sqrt(n + calculate(n - 1));
}

// toikhongmuonhocbichvantoikhongmuonhocbichvan

int main() {
	int n;
	cin >> n;
    cout <<fixed<<setprecision(2)<< calculate(n);
    return 0;
}