# data[].attributes.body
1.
#include <iostream>
using namespace std;
int main()
{
int i;
for (i=1;i<=10;i++)
cout << "Chao ban"<<endl;
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
int N, i;
cout << "Nhap N: ";
cin>>N;
for (i=1; i<=N; i++)
cout << i<<endl;
return 0;
}
7.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
float i, P;
cout << "Nhap N: ";
cin>>N;
P=0;
for (i=1; i<=N; i++)
P=P+1/i;
cout << "Tong P la: "<<P;
return 0;
}
9.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
float i, S;
cout << "Nhap N: ";
cin>>N;
S=0;
for (i=1; i<=N; i++)
S=S+1/(i*i);
cout << "Tong S la: "<<S;
return 0;
}
10.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
int a;
float i, S;
cout << "Nhap N: ";
cin>>N;
cout << "Nhap a: ";
cin>>a;
S=0;
for (i=0; i<=N; i++)
S=S+1/(a+i);
cout << "Tong S la: "<<S;
return 0;
}

# data[].attributes.body
#include <iosstream>
using namespace std;
int main()
{
int i, n, s=0;
cout<<"Nhap n:";
cin>>n;
for (i=1; i>=n;i++)
s=s+i;
while(s<20)
{
s=s+i;
i=i+1;
}
cout<<"Tong cac so tu 1 den "<<n<<" la:"<<s;
return 0;
}

# data[].attributes.body
#include <iostream>

using namespace std;

int main()

{

int s, i;

i=1;s=0;

while( s<=20)

{

s = s+i;

i++;

}

cout <<'' tong la: ''<< s;

return 0;

}

# data[].attributes.body
1.
#include <iostream>
using namespace std;

int main ()
{
int i,n,s;
i=2 ; s=0;
cout <<" nhap n:";
cin >>n;
while ( i<=n )
{
s= s + i;
i= i + 2;
}
cout <<s;

return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i=1,n,p=1;
cout<<"Nhap n:";
cin>>n;
while (i<=n)
{
p=p*i;
i=i+1;
}
cout<<"Tich p co gia tri la "<<p;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i=2,n,s=0;
cout<<"Nhap n:";
cin>>n;
while (i<=n)
{
s=s+i;
i=i+2;
}
cout<<"Tong cac so chan tu 1 den "<<n<<" la:"<<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i=1,n,s=0;
cout<<"Nhap n:";
cin>>n;
while (i<=n)
{
s=s+i;
i=i+1;
}
cout<<"Tong cac gia tri tu 1 den "<<n<<" la:"<<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i,n,p=1;
cout<<"Nhap n:";
cin>>n;
for (i=1;i<=n;i++)
p=p*i;
cout<<"Tich p co gia tri la"<<p;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i,n,p=1;
cout<<"Nhap n:";
cin>>n;
for (i=1;i<=n;i++)
p=p*i;
cout<<"Tich p co gia tri la"<<p;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i=1; s=0; n;
cout<<"nhap n: ";
cin>>n;
while (i<=n)
{
s=s+i;
i++;
}
cout<<"tong la: "<<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int n,i,s=0;
cout<<" Nhap n:";
cin>>n;
for (i=1;i<=n;i+=2)
s=s+i;
cout<<"Tong cac so le trong day so tu 1 den "<<n<<" la:"<<s;
return 0;
}

# data[].attributes.body
câu 10 )
# include < iostream>
using namespace std ;
int main ()
{
unsigned int n ;
int a ;
float i,s ;
cout << "nhap n : " ;
cin >> n ;
cout << " nhap a : " ;
cin >> a ;
s=0 ;
for (i=0; i<=n; i++)
s=s+1/(a+i)
cout << " tong s la : " << s;
return 0;
}

# data[].attributes.body
câu 9 )
# include < iostream>
using namespace std ;
int main ()
{
unsigned int n ;
float i , s ;
cout << " nhap n : " ;
cin >> n ;
s = 0 ;
for ( i =1;i<=n; i ++)
s=s+1/(i*i) ;
cout << " tong s la : " << s ;
return 0 ;
}

# data[].attributes.body
câu 7)

# include <iostream>
using namespace std;
int main()
{
unsigned int n ;
float i, p;
cout <<" nhap n : " ;
cin >> n ;
p=0
for(i=1;i<=n;i++)
p=p+1/i ;
cout <<" tong p la : " <<p;
return 0 ;
}

# data[].attributes.body
1
#include <iostream>
using namespace std;

int main()
{
int i;
for(i=1;i<=10;i++);
cout<<"Chao ban";
return 0;
}
2.
#include <iostream>
using namespace std;

int main()
{
int i,N;
while(i<=N);
cout<<"nhap N";
cin>>N;
for(i=1;i<=N;i++);
cout<<i<<endl;

return 0;
}
3.
#include <iostream>
using namespace std;

int main()
{
int i,n,S;
cout<<"nhap n:";
cin>>n;
S=0;
for(i=1;i<=n;i++);
{
S=S+i;
}
cout<<"tong la:"<<S;

return 0;
}
4.
#include <iostream>

using namespace std;

int main()
{
int i,n,S;
cout<<"nhap n:";
cin>>n;
S=0;
for(i=2;i<=n;i+2);
{
if(i%2==0);
{
S=S+i;
}
}
cout<<"tong la:"<<S;

return 0;
}
5.
#include <iostream>
using namespace std;

int main()
{
int i,n,S;
cout<<"nhap n:";
cin>>n;
S=0;
for(i=1;i<=n;i+1);
{
if(i%2!=0);
{
S=S+i;
}
}
cout<<"tong la:"<<S;

return 0;
}
6.
#include <iostream>
using namespace std;

int main()
{
int i,n,P;
cout<<"nhap n:";
cin>>n;
P=1;
for(i=1;i<=n;i+1);
{
P=P*i;
}
cout<<"tich la:"<<P;

return 0;
}
7.
#include <iostream>
using namespace std;

int main()
{
int i,N,P;
cout<<"nhap N:";
cin>>N;
P=0;
for(i=1;i<=N;i++);
{
P=P+1/i;
}
cout<<"tong la:"<<P;

return 0;
}
10.
#include <iostream>
using namespace std;

int main()
{
int i,n,a,S;
cout<<"nhap n:"<<"\n nhap a:";
cin>>n>>a;
S=0;
for(i=0;i<=n;i++);
{
S=S+1/(a+i);
}

cout<<"tong la"<<S;
return 0;
}

# data[].attributes.body
int main()
{
int i, n, P;
cout<<"nhap n";
cin>>n;
p=1,i=1;
while(i<=n)
{
p=p*i;
i=i+1;
}
cout<<"tich cac so tu 1 den n la"<<p;
return 0;
}

# data[].attributes.body
int main()
{
int n, i, s;
i=0; S=0;
cout<<"nhap ";
cin>>n;
while (i<=n)
{
S=S+i;
i=i+2;
}
cout<<"tong cac so chan tu 2 den n la :"<<S;
return 0;
}

# data[].attributes.body
1.
#include <iostream>
using namespace std;
int main()
{
int i;
for (i=1;i<=10;i++)
cout << "Chao ban"<<endl;
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
int N, i;
cout << "Nhap N: ";
cin>>N;
for (i=1; i<=N; i++)
cout << i<<endl;
return 0;
}
7.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
float i, P;
cout << "Nhap N: ";
cin>>N;
P=0;
for (i=1; i<=N; i++)
P=P+1/i;
cout << "Tong P la: "<<P;
return 0;
}
9.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
float i, S;
cout << "Nhap N: ";
cin>>N;
S=0;
for (i=1; i<=N; i++)
S=S+1/(i*i);
cout << "Tong S la: "<<S;
return 0;
}
10.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
int a;
float i, S;
cout << "Nhap N: ";
cin>>N;
cout << "Nhap a: ";
cin>>a;
S=0;
for (i=0; i<=N; i++)
S=S+1/(a+i);
cout << "Tong S la: "<<S;
return 0;
}

# data[].attributes.body
1.
#include <iostream>
using namespace std;
int main()
{
int i;
for (i=1;i<=10;i++)
cout << "Chao ban"<<endl;
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
int N, i;
cout << "Nhap N: ";
cin>>N;
for (i=1; i<=N; i++)
cout << i<<endl;
return 0;
}
7.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
float i, P;
cout << "Nhap N: ";
cin>>N;
P=0;
for (i=1; i<=N; i++)
P=P+1/i;
cout << "Tong P la: "<<P;
return 0;
}
9.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
float i, S;
cout << "Nhap N: ";
cin>>N;
S=0;
for (i=1; i<=N; i++)
S=S+1/(i*i);
cout << "Tong S la: "<<S;
return 0;
}
10.
#include <iostream>
using namespace std;
int main()
{
unsigned int N;
int a;
float i, S;
cout << "Nhap N: ";
cin>>N;
cout << "Nhap a: ";
cin>>a;
S=0;
for (i=0; i<=N; i++)
S=S+1/(a+i);
cout << "Tong S la: "<<S;
return 0;
}

# data[].attributes.body
Bài 10

# data[].attributes.body
Bài 9

# data[].attributes.body
#include <iostream>

using namespace std;

int main ()
{
int n,i,S;
cout << "nhap n";
cin >> n;
S=0;i=2;
for (i=1;i<=n; i++)
{
if(i%2==0);
{
S=S+2;
}
cout << "tong cac so chan tu 2 den n la:"<<S;
return 0;
}

# data[].attributes.body
Bài 8

# data[].attributes.body
#include <iostream>

using namespace std;

int main ()
{
int n,i,P;
cout << "nhap n";
cin >> n;
P=0;i=1;
while (i<=n)
{
P=P*i;
i++;
}
cout << "tich cac gia tri la:"<<P;
return 0;
}

# data[].attributes.body
#include <iostream>

using namespace std;

int main ()
{
int n,i,S;
cout << "nhap n";
cin >> n;
S=0;i=2;
while (i<=n)
{
S=S+i;
i=i+2;
}
cout << "tong cac so chan tu 2 den n la:"<<S;
return 0;
}

# data[].attributes.body
#include <iostream>

using namespace std;

int main ()
{
int n,i,S;
cout << "nhap n";
cin >> n;
S=0;i=1;
while (i<=n)
{
S=S+i;
i=i+1;
}
cout << "tong la:"<<S;
return 0;
}

# data[].attributes.body
7.#include <iostream>
using namespace std;
int main() {
float n,P,i;
cout<<"nhap n = ";
cin>>n;
P=0;
for (i=1;i<=n;i++)
{
P=P+1/i;
}
cout<<"tong P la: "<<P;
return 0;
}
8.
#include<iostream>
using namespace std;
int main()
{
float i,Y;
Y=0;
for (i=1;i<=50;i++)
{
Y=Y+i/(i+1);
}
cout<<"tong Y la: "<<Y;
return 0;
}
9.
#include <iostream>
using namespace std;
int main()
{
int n;
float i,s;
s=0;
cout<<"nhap n= ";
cin>>n;
for (i=1;i<=n;i++)
{
s=s+1/(i*i);
}
cout<<"tong s la: "<<s;
return 0;
}
10.
#include <iostream>
using namespace std;
int main()
{
int n;
float i,S,a;
cout<<"nhap n= ";
cin>>n;
cout<<"nhap a= ";
cin>>a;
S=0;
for (i=0;i<=n;i++)
{
S=S+1/(a+i);
}
cout<<"tong S la: "<<S;
return 0;
}

# data[].attributes.body
7.
# include <iostream>
using namespace std;
int main()
{
float i,N,P;
cout<<'' nhap N";
cin>>N;
P=0
for (i=1;i<=n;i++)
P=P+1/i;
cout<<'' tong P la: ''<< P;
return 0;
}
8.
# include <iostream>
using namespace std;
int main()
{
int N;
float S,i;
S=0;
N=50;
for (i=1;i<=N;i++)
S=S+i/(i+1);
cout <<'' S=''<< S;
return 0;
}
9.
# include <iostream>
using namespace std;
int main()
{
int n ;
float S,i;
cout <<'' nhap n'';
cin>>n;
S=0;
for (i=1;i<=n;i++)
S=S+1/(i *i);
cout << S<< endl;
return 0;
}

# data[].attributes.body
# include <iostream>
using namespace std;
int main()
{
int i,S,n;
cout <<'' nhap n'';
cin>>n;
S=0
for (i=1; i<=n;i+=2)
{
S=S+i;
}
cout<<'' tong cac gia tri le tu 1 den n la ''<<
return 0;
}

# data[].attributes.body
Bài 1:
#include <iostream>
using namespace std;

int main()
{
int i;
for(i=1;i<=10;i++)
cout<< "Chao ban" <<endl;
return 0;
}
Bài 7:
#include <iostream>
using namespace std;

int main()
{
int n;
float p,i;
cout<< "nhap n: ";
cin>>n;
p=0;
for(i=1;i<=n;i++)
p=p+1/i;
cout<<"tong p: "<<p;
return 0;
}
Bài 8:
#include <iostream>
using namespace std;

int main()
{
int n;
float y,i;
y=0;
n=50;
for (i=1;i<=n;i++)
y=y+i/(i+1);
cout<<"tong y: "<<y;
return 0;
}
Bài 9:
#include <iostream>
using namespace std;

int main()
{
float n,i,s;
cout<< "nhap n: ";
cin>>n;
for (i=1;i<=n;i++)
s=s+1/(i*i);
cout<<"tong s: "<<s;
return 0;
}
Bài 10:
#include <iostream>
using namespace std;

int main()
{
float a,n,i,s;
cout<< "nhap n: ";
cin>>n>>a;
s=0;
for (i=0;i<=n;i++)
s=s+1/(a+i);
cout<<"tong s: "<<s;
return 0;
}

# data[].attributes.body
#include <iostream>

using namespace std;

int main()

{

int s, i;

i=1;s=0;

while( s<=20)

{

s = s+i;

i++;

}

cout <<'' tong la: ''<< s;

return 0;

}

# data[].attributes.body
#include <iostream>

using namespace std;

int main()

{

int n, s, i;

cout<<''nhap n: '';

cin>>n;

i=1;s=0;

while( i<n)

{

s = s+i;

i++;

}

cout <<'' tong la: ''<< s;

return 0;

}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int n,p,i;
cout<<'' nhap n: '';
cin>>n;
p=1;
for( i=1; i<=n; i++)
{
p=p*i;
}
cout<<'' tich la: '' <<p;
return 0;
}

# data[].attributes.body
1.
#include <iostream>
using namespace std;
int main ()
{
for (int i=1; i<=10; i++)
cout<<" chao ban "<<endl;
return 0;
}
2.
#include <iostream>
using namespace std;
int main ()
{
int n,i;
cout<< "nhap n" ;
cin>>n;
for (int i=1; i<=n; i++)
cout<< i << endl;
return 0;
}
3.
#include <iostream>
using namespace std;
int main ()
{
int a,i,s;
s=0;
cin>>a;
for (i=1; i<=a; i++)
s=s+i;
return 0;
}
4.
#include <iostream>
using namespace std;
int main ()
{
int a,i,s;
s=0;
cin>>a;
for (i=2; i<=a; i=i+2)
s=s+i;
cout<< s;
return 0;
}
5.
#include <iostream>
using namespace std;
int main ()
{
int a,i,s;
s=0;
cin>>a;
for (i=1; i<=n; i=i+2)
s=s+i;
cout<<s;
return 0;
}

6.
#include <iostream>
using namespace std;
int main ()
{
int a,i,s;
s=1;
cin>>a;
for (i=1; i<=a; i++)
s=s*i;
cout<<s;
return 0;
}
7.
#include <iostream>
using namespace std;
int main ()
{
int n;
float p,i;
cout<< "nhap n" ;
cin>>n;
p=0;
for (i=1; i<=n; i++)
p=p+1/i;
cout<< "tong p:" <<p;
return 0;
}
8.
#include <iostream>
using namespace std;
int main ()
{
int n;
float y,i;
y=0;
i=50;
for (i=1; i<=50; i++)
y=y+1/(i+1);
cout<<y;
return 0;
}
9.
#include <iostream>
using namespace std;
int main ()
{
float s,n,i;
s=0;
cout<< "nhap n:" ;
cin>>n;
for (i=1; i<=n; i++)
s=s+1/(i*i);
cout<<s;
return 0;
}
10.
#include <iostream>
using namespace std;
int main ()
{
int n,a;
float i,s;
cout<< "nhap n:" ;
cin>>n;
cout<< "nhap a:" ;
cin>>a;
s=0;
for (i=0; i<=n; i++)
s=s+1/(a+i);
cout<<s;
return 0;
}

# data[].attributes.body
1)
#iclude <iostream>

using namespace std

int main()
{ int i;
fof( int i = 1; i <= 10 ; i++)
cout<< " chao ban "<< endl;
return 0;
}
2)
#include <iostream>

using namespace std;

int main()
{ int n;
cin>> n;
for(int i = 1; i <= n; i++)
cout<< i<< endl;
return 0;
}
3)
#include <iostream>
using namespace std;

int main()
{
int n,i,s;
s=0;
cout <<"nhap n:";
cinn >>n;
for (i=1 ;i<=n ;i++)
s= s+ i;
cout <<s;
return 0;
}
4.
#include <iostream>
using namespace std;

int main()
{
int n,i,s;
s=0;
cout <<"nhap n:";
cin >>n;
for (i=2 ;i<=n ;i=i+2)
s= s+ i;
cout <<s;
return 0;
}
5)
#include <iostream>
using namespace std;

int main()
{
int n,i,s;
s=0
cout <<"nhap n:';
cin >>n;
for (i=1 ;i<=n ;i=i+2)
s= s + i;
cout <<s;

return 0:
}
6.
#include <iostream>
using namespace std;

int main()
{
int a,i,P;
P = 1;
cin>>a;
for(i = 1; i <= a ; i++ )
P = P*i
cout<< P;

Return 0;
}
7.
#include <iostream>
using namespace std;

int main ()
{
float n,i,P;
cout<<"nhap n";
cin>>n;
P=0;
for ( in=1;i<=n;i++)
P=P+1/i;
cout << P <<endl ;
return 0;
}
8)
#include <iostream>
using namespace std;
int main()
{
float Y=0;
for (int n=1; n<=50; n++)
{
Y=Y+(float)n/(n+1);
}
cout<<"Y="<<Y;
return 0;
}

# data[].attributes.body
7
#include <iostream>
using namespace std;
int main()
{
float n,i,P;
cout <<''nhap n:  ";
cin>>n;
P=0;
for ( i=1; i<=n; i++)
{
P=P+1/i;
}
cout<<" tong P la:   "<<P;
return 0;
}

8
#include <iostream>
using namespace std;
int main ()
{
float i, Y;
Y=0;
for(i=1; i<=50; i++)
{
Y=Y+i/(i+1);
}
cout<<'' tong la: ''<<Y;
return 0;
}

9
#include< iostream>
using namespace std;
int main()
{
int n;
float i, s;
s=0;
cout<<"nhap n  ";
cin>>n;
for ( i=1; i<=n; i++)
{
s=s+1/(i*i);
}
cout<<'' tong la: ''<<s;
return 0;
}

10
#include <iostream>
using name std;
int main ()
{
int n;
float i, s, a;
cout<<'' nhap a: '';
cin>>a;
s=0;
for (i=0; i<=n; i++)
{
s=s+1/(a+i);
}
cout<<'' tong la: ''<<s;
return 0;
}

# data[].attributes.body
8.
#include <iostream>
using namespace std;

int main ()
{
int n;
float i,s;
s=0;n=0;
for (i=1 ; i<=n ; i++)
s= s + i/(i+1);
cout <<s;

return 0;
}
10.
#include <iostream>
using namespace std;

int main ()
{
int a,n;
float i,s;
s= 0;
if ( a==0 && n==0)
cout <<"int";
cin >>a>>n;
for ( i=0; i<=n ; i++)
s= s + 1/(a + i);
cout <<s;

return 0;
}

# data[].attributes.body
BÀI 10
#include <iostream>
using namespace std;

int main ()
{
int N;
float S,i,a;
S=1;
cout<<"nhập a với a là số nguyên dương:";
cin>>a;
cout <<"nhâp N với N là số nguyên dương:";
cin >>N;
for (i=1;i<=N ;i++)
S= S + 1/(a+i);
cout <<"tổng là "<<S;

return 0;
}

# data[].attributes.body
#include <iosstream>
using namespace std;
int main()
{
int i, n, s=0;
cout<<"Nhap n:";
cin>>n;
for (i=1; i>=n;i++)
s=s+i;
while(s<20)
{
s=s+i;
i=i+1;
}
cout<<"Tong cac so tu 1 den "<<n<<" la:"<<s;
return 0;
}

# data[].attributes.body
Bài 7

# data[].attributes.body
BÀI 9
#include <iostream>
using namespace std;

int main ()
{
int n;
float S,i;
S=0;
cout <<"nhap n:";
cin >>n;
for (i=1 ;i<=n ;i++)
S= S + 1/(i*i);
cout <<"tổng là "<<S;

return 0;
}

# data[].attributes.body
7)
#include <iostream>

using namespace std;

int main()
{
float a,i,S;
S = 0;
cin>>a;
for(  i = 1; i <= a ; i++ )
S = S + 1/i;
cout<< S;

return 0;
}
8)
#include <iostream>

using namespace std;

int main()
{
int N;
float S,i;
S = 0;
N = 50;
for(i = 1; i <= N ; i++ )
S = S + i/(i +1);
cout<< S;

return 0;
}

9)
#include <iostream>

using namespace std;

int main()
{
float a,i,S;
S = 0;
cin>>a;
for(  i = 1; i <= a ; i++ )
S = S + 1/(i*i);
cout<< S;

return 0;
}
10)
#include <iostream>

using namespace std;

int main()
{
int a,N;
float S,i;
S = 0;
if( a == 0 && N == 0)
cout<<" inf";
for(  i = 0; i <= N ; i++ )
S = S + 1/(a + i);
cout<< S;

return 0;
}

# data[].attributes.body
BÀI 7
#include <iostream>
using namespace std;

int main ()
{
int n;
float S,i;
S=0;
cout <<"nhap n:";
cin >>n;
for (i=1 ;i<=n ;i++)
S= S + 1/i;
cout <<"tổng là "<<S;

return 0;
}

# data[].attributes.body
7.#include <iostream>
using namespace std;
int main() {
float n,P,i;
cout<<"nhap n = ";
cin>>n;
P=0;
for (i=1;i<=n;i++)
{
P=P+1/i;
}
cout<<"tong P la: "<<P;
return 0;
}
8.
#include<iostream>
using namespace std;
int main()
{
float i,Y;
Y=0;
for (i=1;i<=50;i++)
{
Y=Y+i/(i+1);
}
cout<<"tong Y la: "<<Y;
return 0;
}
9.
#include <iostream>
using namespace std;
int main()
{
int n;
float i,s;
s=0;
cout<<"nhap n= ";
cin>>n;
for (i=1;i<=n;i++)
{
s=s+1/(i*i);
}
cout<<"tong s la: "<<s;
return 0;
}
10.
#include <iostream>
using namespace std;
int main()
{
int n;
float i,S,a;
cout<<"nhap n= ";
cin>>n;
cout<<"nhap a= ";
cin>>a;
S=0;
for (i=0;i<=n;i++)
{
S=S+1/(a+i);
}
cout<<"tong S la: "<<S;
return 0;
}

# data[].attributes.body
3)
#include <iostream>

using namespace std;

int main()
{
int a,i,S;
S = 0;
cin>>a;
for( i = 1; i <= a ; i++)
S = S+i;
cout<< S;

return 0;
}
4)
#include <iostream>

using namespace std;

int main()
{
int a,i,S;
S = 0;
cin>>a;
for( i = 2; i <= a ; i = i +2  )
S = S+i;
cout<< S;

return 0;
}
5)
#include <iostream>

using namespace std;

int main()
{
int a,i,S;
S = 0;
cin>>a;
for( i = 1; i <= a ; i = i +2  )
S = S+i;
cout<< S;

return 0;
}
6)
#include <iostream>

using namespace std;

int main()
{
int a,i,S;
S = 1;
cin>>a;
for( i = 1; i <= a ; i++ )
S = S*i;
cout<< S;

return 0;
}
7)
#include <iostream>

using namespace std;

int main()
{
float a,i,S;
S = 0;
cin>>a;
for(  i = 1; i <= a ; i++ )
S = S + 1/i;
cout<< S;

return 0;
}
8)
#include <iostream>

using namespace std;

int main()
{
int N;
float S,i;
S = 0;
N = 50;
for(i = 1; i <= N ; i++ )
S = S + i/(i +1);
cout<< S;

return 0;
}

9)
#include <iostream>

using namespace std;

int main()
{
float a,i,S;
S = 0;
cin>>a;
for(  i = 1; i <= a ; i++ )
S = S + 1/(i*i);
cout<< S;

return 0;
}
10)
#include <iostream>

using namespace std;

int main()
{
int a,N;
float S,i;
S = 0;
if( a == 0 && N == 0)
cout<<" inf";
for(  i = 0; i <= N ; i++ )
S = S + 1/(a + i);
cout<< S;

return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;

int main ()
{
int i,n,p;
i=1 ; p=1;
cout <<" nhap n:";
cin >>n;
while ( i<=n )
{
p= p * i;
i++ ;
}
cout <<p;
return 0;
}

# data[].attributes.body
1.
#include <iostream>
using namespace std;

int main ()
{
int i,n,s;
i=2 ; s=0;
cout <<" nhap n:";
cin >>n;
while ( i<=n )
{
s= s + i;
i= i + 2;
}
cout <<s;

return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;

int main ()
{
int i,s;
i=1 ; s=0;
while ( s<=20 )
{
s= s + i ;
i= i + 1 ;
}
cout <<s;

return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int S,i;
S=0;
i=1;
while (S<=20)
{
S=S+i;
i=i+1;
}
cout<<"tong la: "<<S;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;

int main ()
{
int i,n,s;
i=1 ; s=0;
cout <<" nhap n:";
cin >>n;
while ( i<=n )
{
s= s + i ;
i= i + 1 ;
}
cout <<s;

return 0;
}

# data[].attributes.body
8.
#include <iostream>
using namespace std;
int main()
{
float i,Y;
Y=0;
for (i=1;i<=50;i++)
{
Y=Y+i/(i+1);
}
cout<<"tong Y la: "<<Y;
return 0;
}
9.
#include <iostream>
using namespace std;
int main()
{
int n;
float i,s;
s=0;
cout<<"nhap n= ";
cin>>n;
for (i=1;i<=n;i++)
{
s=s+1/(i*i);
}
cout<<"tong s la: "<<s;
return 0;
}
10.
#include <iostream>
using namespace std;
int main()
{
int n;
float i,S,a;
cout<<"nhap n= ";
cin>>n;
cout<<"nhap a= ";
cin>>a;
S=0;
for (i=0;i<=n;i++)
{
S=S+1/(a+i);
}
cout<<"tong S la: "<<S;
return 0;
}

# data[].attributes.body
7.
#include <iostream>
using namespace std;
int main() {
float n,P,i;
cout<<"nhap n = ";
cin>>n;
P=0;
for (i=1;i<=n;i++)
{
P=P+1/i;
}
cout<<"tong P la: "<<P;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i,s,n;
i=2; s=0;
cin>>n;
while (i<=n)
{
S =S + i;
i = i +2;
}
cout<<S;
return 0;
}

# data[].attributes.body
38. Vũ Thị Thanh Tâm 11a4

# data[].attributes.body
#include<iostream>
using namespace std;
int main()
{
int p=1,i=1,n;
cout <<"nhap n nguyen duong: ";cin>>n;
while(i<=n)
{
p=p*i;
i++;
}
cout<<"p = "<<p;
return 0;
}

# data[].attributes.body
#include<iostream>
using namespace std;
int main()
{
int s=0,i=0,n;
cout <<"nhap n nguyen duong: ";cin>>n;
while(i<=n)
{
s=s+i;
i+=2;
}
cout<<"Tong s = "<<s;
return 0;
}

# data[].attributes.body
#include<iostream>
using namespace std;
int main()
{
int s=0,i=1,n;
cout <<"nhap n nguyen duong: ";cin>>n;
while(i<=n)
{
s=s+i;
i++;
}
cout<<"Tong s = "<<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int N,p=1;
cout <<"Nhap N nguyen duong: ";cin>>N;
for(int i=1;i<=N;i++) p=p*i;
cout<<"p= "<<p;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int N,S=0;
cout <<"Nhap N nguyen duong: ";cin>>N;
for (int i=2;i<=N;i=i+2)
S=S+i;
if (N%2==0)
cout << "Ket qua: S= " <<S;
else cout <<"N k phai la so chan";
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int N,S=0;
cout <<"Nhap N nguyen duong : "; cin>>N;
for ( int i=1;i<=N;i++ )
S=S+i;
cout <<"Ket qua S= "<<S;
return 0;
}

# data[].attributes.body
Bài 8
#include <iostream>
using namespace std;
int main ( )
{
float i, y;
y=0;
for (i=1; i<=50; i++)
{
y=y+i/(i+1);
}
cout<<"Tong y la: "<<y;
return 0;
}

Bài 9
#include <iostream>
using namespace std;
int main ( )
{
int n;
float i,S;
S=0;
cout<<"Nhap n= ";
cin>>n;
for (i=1; i<=n; i++)
{
S=S+1/(i*i);
}
cout<<"Tong S la: "<<S;
return 0;
}

Bài 10
#include <iostream>
using namespace std;
int main ( )
{
int n;
float i,S,a;
cout<<"Nhap n= ";
cin>>n;
cout<<"Nhap a= ";
cin>>a;
S=0;
for (i=0; i<=n; i++)
{
S=S+1/(a+i);
}
cout<<"Gia tri S la: "<<S;
return 0;
}

# data[].attributes.body
#include<iostream>
using nmaespace std;
intmain()
{
int S,i;
S=0;
i=1;
while(S<=20)
{
S=S+i;
i=i+1;
}
cout<<" Tong la:"<<S;
return 0;
}

# data[].attributes.body
#include <iostream>

using namespace std;

int main()
{
int n,S,i;
cout << " nhap n: ";
cin >> n;
S=0;i=0;
while (i<=n)
{
S=S+i;
i=i+2;
}
cout << "gia tri tong S=" << S;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int s,i;
s=0;
i=1;
while (s<=20)
{
s=s+i ;
i=i+1 ;
}
cout<<"Tong la: "<<s;
return 0;
}

# data[].attributes.body
BÀI 7
#include <iostream>
using namespace std;
int main()
{
float n,P,i;
cout<<"Nhap n:";
cin>>n;
for(i=1;i<=n;i++)
{
P=P+1/i;
}
cout<<"Tong P la:"<<P;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i,S,N;
cout<<"nhap N:";
cin>>N;
i=1; S=0;
while (i<=N)
{
S=S+i;
i++;
}
cout<<"tong la:"<<S;
return 0;
}

# data[].attributes.body
Bài 7

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int n,s,i;
cout<<“nhap n:”;
cin>>n;
s=0,i=0;
while(i<=n)
{
s=s+i;
i=i+2;
}
cout<<“tong s la:”<<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int n,P,i;
cout<<"nhap n:";
cin>>n;
P=1;
for(i=1;i<=n;i++)
{
P=P*i;
}
cout<<" Tich gia tri tu 1-n la:"<<P<<endl;
return 0;

}