Tính s(n) = sqrt(2+sqrt(2+sqrt(2+sqrt(2 python))))

description
Bài 33. Tính S[n] = sqrt[2+sqrt[2+sqrt[2+...+sqrt[2+sqrt[2]]]]] lấy căn n lầnSun Oct 03, 2010 12:18 pm

more_horiz

Tính S[n] = sqrt[2+sqrt[2+sqrt[2+...+sqrt[2+sqrt[2]]]]]


BÀI TOÁN

Viết chương trình tính S[n] = sqrt[2+sqrt[2+sqrt[2+...+sqrt[2+sqrt[2]]]]] lấy căn n lần. Với n được nhập từ bàn phím

CHƯƠNG TRÌNH MẪU

Code:

#include "conio.h"
#include "stdio.h"
#include "math.h"

void main[]{
    clrscr[];
    int n;
    float S = 0;
    printf["Nhap vao n = "];
    scanf["%d",&n];
    for[int i=0; i

Chủ Đề