C, pasted on Aug 17:
 ```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ``` ```#include #include int main() { int i, n; float x, S, T; long M; printf("\nNhap x: "); scanf("%f", &x); do { printf("\nNhap n: "); scanf("%d", &n); if(n < 1) { printf("\n N phai >= 1. Xin nhap lai !"); } }while(n < 1); S = 0; T = 1; M = 0; i = 1; while(i <= n) { T = T * x; M = M + i; S = S + T/M; i++; } printf("\nTong la %f", S); getch(); return 0; } ```

Output:
 ```1 ``` ```Line 17: error: conio.h: No such file or directory ```

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
for(float S=0,y=1,k=0,x,N,a=1;S==0;S=0,y=1,k=0,a=1)
{
cout<<"Nhap x,N: ";
cin>>x>>N;
for(;y<=N;++y)
{
for(;a<=y;++a)
{
k=k+a;
}
S=S+pow(x,y)/k;
}
cout<<"S="<<S;
cout<<endl;
}
return 0;
}

#include<stdio.h>
#include<conio.h>
int main()
{
int i=1, n, x;
float T= 0, t = 0 ;
printf(" nhap vao x va n \n ");
scanf("%d%d", &x, &n);
while(i<=n)
{
t = t + i;
T = T + pow(x,(i/t));
i++;
}
printf("t = %f", t);
printf("T = %f", T);
getch();
return 0;
}

#include<iostream>
#include<cmath>
using namespace std;
int main(){
int x,n;
cout<<"x="; cin>>x;
cout<<"n="; cin>>n;
float s=0, t=0;
for (int i=1; i<=n; i++){
t+=i;
s+=(float)(pow(x,i)/t);
}
cout<<"kq="<<s<<endl;
}

#include<iostream>
#include<cmath>
using namespace std;
int main(){
int x,n;
cout<<"x="; cin>>x;
cout<<"n="; cin>>n;
float s=0, t=0;
for (int i=1; i<=n; i++){
t+=i;
s+=(float)(pow(x,i)/t);
}
cout<<"kq="<<s<<endl;
}

#include <stdio.h>
#include <conio.h>

/*Bài 16: Tính S(n) = x + x^2/1 + 2 + x^3/1 + 2 + 3 + … + x^n/1 + 2 + 3 + …. + N*/
int LuyThua(int x,int n)
{
int i=1,s=1;
while(i<=n)
{
s*=x;
i++;
}
return s;
}

float TinhTong(int x,int n)
{
int i=0,temp=0;
float s=0;
while(++i<=n)
{
temp+= i;
s+=(float)LuyThua(x,i)/temp;
}
return s;
}

void main()
{
int x,n;
do
{
printf("\nNhap Co So:");
scanf("%d",&x);

printf("\nNhap So Mu:");
scanf("%d",&n);

if(x<1) puts("\nSo Nhap Khong Hop Le !!!");
}
while(x<1);
printf("\nTong S=%.4f",TinhTong(x,n));
getch();
}

#include <stdio.h>
#include <conio.h>

/*Bài 16: Tính S(n) = x + x^2/1 + 2 + x^3/1 + 2 + 3 + … + x^n/1 + 2 + 3 + …. + N*/
int LuyThua(int x,int n)
{
int i=1,s=1;
while(i<=n)
{
s*=x;
i++;
}
return s;
}

float TinhTong(int x,int n)
{
int i=0,temp=0;
float s=0;
while(++i<=n)
{
temp+= i;
s+=(float)LuyThua(x,i)/temp;
}
return s;
}

void main()
{
int x,n;
do
{
printf("\nNhap Co So:");
scanf("%d",&x);

printf("\nNhap So Mu:");
scanf("%d",&n);

if(x<1) puts("\nSo Nhap Khong Hop Le !!!");
}
while(x<1);
printf("\nTong S=%.4f",TinhTong(x,n));
getch();
}

qqq

int cong1(int n)
{
int bt = 0;
for(int i = 2; i <= n; i++)
{
bt = bt + i;
}
return bt;
}
float BAI_16(int n, int x)
{
int bt = x;
for(int i = 2; i <= n; i++)
{
bt = bt + pow(x,i) + cong1(i);
}
return bt;
}

đề mình có phần chưa hiều lắm đề là
Tính S(n) = x + x^2/1 + 2 + x^3/1 + 2 + 3 + … + x^n/1 + 2 + 3 + …. + N
hay Tính S(n) = x + x^2/(1 + 2) + x^3/(1 + 2 + 3 + …)+ x^n/(1 + 2 + 3 + …. + N)

ok