Laboratoriya ishi 25 Mavzu: np-to’liq masalalar. Ishdan maqsad


Download 139.81 Kb.
bet9/9
Sana31.01.2024
Hajmi139.81 Kb.
#1829835
1   2   3   4   5   6   7   8   9
Bog'liq
B Nabiyev 613-20

Amaliy qism
#include
#include
using namespace std;
int main()
{
double Sum=0, y=8, z=2;
int i=1;
while (i>=7)
{
Sum=//твоя функция//;
Sum++;
i++;
}
cout<<"Сумма ряда = "<return 0;
}

#include
#include
using namespace std;
size_t factorial(size_t n){
size_t res = 1;
if( n > 1 )
res = n*factorial(n - 1);
return res;
}
int main(){
float y = 8;
float z = 2;
float S = 0;
float f = 0;
for( size_t i = 1; i <= 7; i++ ){
f = pow(factorial(i) + y, 1.0f / i);//sqrt[i](i! + y)
f = f - pow(z, i*1.0f);//f - z^i
S = S + f;
}
cout<<"S = "<return 0;
}

Download 139.81 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling