# data[].attributes.body
Phạm Thị Thương Thương 11A2
Bài 8

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

using namespace std;

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

using namespace std;

int main()
{ int n;
cin>> n;
for(int i = 1; i <= n; i=i+1)
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=i+1)
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=i+1 )
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";
cin>>a>>N;
for(  i = 0; i <= N ; i++ )
S = S + 1/(a + i);

cout<< S;

return 0;
}

# data[].attributes.headline
Nguyễn Thị Thương Thương lớp 11a1 bài 10

# data[].attributes.subject
Nguyễn Thị Thương Thương lớp 11a1 bài 10

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

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

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

using namespace std;

int main()

{

float N,a,S,i;

cout<< " nhap N:";

cin>>N;
S=0;

for (i=0;i<=N;i=i++)

S=S+1/(a+i);
cout<<" tong la:"<<S;

return 0;

}

# data[].attributes.body
#include <iostream>
using namespacestd;
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;
}

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

using namespace std;

int main()

{

Float i,P;

P=0;

for (i=1;i<=50;i=++);

P=P+(i/i+1);
Cout<<" tong P la:"<<P;

return 0;

}

# data[].attributes.body
#include <iostream>
using namespacestd;
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;
}

# data[].attributes.body
Int main(){
Float:n,S,i
Cout<<"nhap n";
Cin>> n;
S=0;
For(i=1;i<n;i++)
S=S+1/(i*i);
Cout<<"tong là:"<<S

Return 0;
}

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

using namespace std;

int main()

{

float N,a,S,i;

cout<< " nhap N:";

cin>>N;
S=0;

for (i=0;i<=N;i=i++)

S=S+1/(a+i);
cout<<" tong la:"<<S;

return 0;

}

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

using namespace std;

int main()

{

float n,i,S;

cout<< " nhap n:";

cin>>n;
S=0;

for (i=1;i<=n;i=i++)

S=S+1/i*i;
cout<<" Tong la:"<<S;

return 0;

}

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

using namespace std;

int main()

{

float n,i,S;

cout<< " nhap n:";

cin>>n;

S=0;

for (i=1;i=50;i=i++)

S=S+i/i+1;
cout<<" Tong la:"<<S;

return 0;

}

# data[].attributes.body
#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 la:"<<P;

return 0;

}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int N,i;
cout<<”Nhap so N:”;
cin>>N ;
int P=1;
for(i=1; i<=N; i++)
{
P=P*i;
}
cout<<”Tich cac so tu 1 toi N la:”<<P<<endl;
return 0;

}

# data[].attributes.body
#include<iostream>
Using namespace std;
int main()
{
int n,i,s;
S = 1;
i = 1;
cout << ("\nNhập vào số n:");
cin >> n;
for(int i = 1; i <=n; i++)
{
S = S * i;
}
cout << ("\n Tich P là:" << S);
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=2;i<=n;i=i+2)
s=s+i;
cout<<"Tong cac so 2+4+6...+N: "<<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main() {
intn;
long s = 0;
cout<<"Nhập vào số n: ";
cin>> n;
for(int i = 1; i <= n; i++){
s += i;
}
cout<<"Tổng 1 + 2 + 3 +... + "<<n<<" là: "<<s;
return 0;
}

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

using namespace std;

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

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

using namespace std;

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

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

using namespace std;

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

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

using namespace std;

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

cout<<"Tong p= "<<p;
return 0;
}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;
float Y;
int n;
int main()
{
cin>>n;
while (n<=50)
{
Y=Y+(float(n)/(n+1));
n++;
}
cout<<Y;
return 0;
}

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

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

using namespace std;
int N,a;
float S,i;
int main()
{
cin>>a>>N;
for(i=0;i<=N;i++)
{
S=S+(1/(a+i));
}
cout<<S;
return 0;
}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;
int N;
int S,i;
int main()
{
cin>>N;
for(i=1;i<=N;i++)
{
S=S+ pow(i,2);
}
cout<<S;
return 0;
}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;
float Y;
int n;
int main()
{
cin>>n;
while (n<=50)
{
Y=Y+(float(n)/(n+1));
n++;
}
cout<<Y;
return 0;
}

# data[].attributes.body
bài 8
#include
using namespace std;
float Y;
int n;
int main()
{
cin>>n;
while (n<=50)
{
Y=Y+(float(n)/(n+1));
n++;
}
cout<<Y;
return 0;

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

using namespace std;
int N;
float P,i;
int main()
{
cin>>N;
for(i=1;i<=N;i++)
{
P=P+(1/i);
}
cout<<P;
return 0;
}

# data[].attributes.body
#include<ios tream >
Using namespace sdt;
Fload p;i;n;
Int man()
{
Cout<<“nhap n”<<
Cin>>n;
P=0
For (i=1;i<=n;i++)
}
P=p+1/i
{
Cout<<“tong la:”<<p;
Retunrn 0;
}

# data[].attributes.body
bài 10
#include <iostream>

using namespace std;
int N,a;
float S,i;
int main()
{
cin>>a>>N;
for(i=0;i<=N;i++)
{
S=S+(1/(a+i));
}
cout<<S;
return 0;
}

# data[].attributes.body
bài 7
using namespace std;
int N;
float P,i;
int main()
{
cin>>N;
for(i=1;i<=N;i++)
{
P=P+(1/i);
}
cout<<P;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std ;
int main ()
{
int n;
cout<<"Nhap a: "<<endl;
cin>>a>>;
cout<<"Nhap n: "<<endl;
for(i=0;i<=n;i++)
{
S=S+1/a+i
}
cout<<" Tong la: "<<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std ;
int main ()
{
int N ;
cout<< “ Nhap so N “ ;
cin>> N ;
float P=0 ;
for ( float i=1 ; i<=N ; i++)
{
P=P+1/i ;
}
cout<< “ Tong P la: “ << P << endl ;
return 0 ;
}

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

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

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

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

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

using namespace std;

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

using namespace std;

int main()
{ int n;
cin>> n;
for(int i = 1; i <= n; i=i+1)
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=i+1)
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=i+1 )
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=i+1 )
S = S + 1/i;
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=i+1 )
S = S + 1/(i*i);
cout<< S;

return 0;
}

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

using namespace std;

int main()

{

Float N,a,S,n;

cout<< " nhap a:";

cin >> a;
cout << "nhap N:";
cin >> N;

S=0;

for (n=0;n<=N;n++)

S=S+(1/a+n)
Cout<<" tong S la:"<<S;

return 0;

}

# data[].attributes.body
#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*i)
Cout<<" tong P la:"<<P;

return 0;

}

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

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

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

using namespace std;

int main()

{

Float i,P;

P=0;

for (i=1;i<=50;i=++)

P=P+(i/i+1)
Cout<<" tong P la:"<<P;

return 0;

}

# data[].attributes.body
#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;

}

# data[].attributes.body
#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;
}

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

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int i,s,n;
cout<<"\n Nhap vao so n:";
cin>>n;
s=0;
i=2;
while(i<=n)
{
s=s+i;
i=i+2;
}
cout<<"\n giá trị tổng S = 2 + 4 + 6 +... + N la :"<<s;
return 0;
}

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

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

int main()

{

int n,Is;

S = 0;

I = 1;
while (s<=20)

{

S = S + I;

I = I ++;

}

cout << ("\n tổng s = 1 + 2 + 3 +... cho đến khi s > 20 la :" << S);

return 0;

}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int N,i,p;
cout<<”Nhap so N:”;
cin>>N ;
int p=1;
for(i=1; i<=N; i++)
{
p=p*i;
}
cout<<”Tich cac so tu 1 toi n là”<<p<<endl;
return 0;

}

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

int main()

{

int n,i,s;

S = 1;

i = 1;

cout << ("\nNhập vào số n:");

cin >> n;

for(int i = 1; i <=n; i++)

{

S = S * i;

}

cout << ("\n Tich P là:" << S);

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=2;i<=n;i=i+2)
s=s+i;
cout<<"Tong cac so 2+4+6...+N: "<<s;
return 0;
}

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

{

int n,i,s;

s = 0;

i = 1;

cout << ("\nNhập vào số n:");

cin >> n;

for(int i = 1; i <=n; i++)

{

s = s + i;

}

cout << ("\n Tong cac so tu 1 den n la :" << s);

return 0;

}

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

using namespace std;

int main()

{

float n,a,s,i;

cout<< " nhap n:";

cin>>n;
s=0;

for (i=0;i<=n;i=i++)

s=s+1/(a+i);
cout<<" tong la:"<<s;

return 0;

}

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

using namespace std;

int main()

{

float n,i,p;

cout<< " nhap n:";

cin>>n;
s=0;

for (i=1;i<=n;i=i++)

s=s+1/i*i;
cout<<" tong la:"<<s;

return 0;

}

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

using namespace std;

int main()

{

float n,i,y;

cout<< " nhap n:";

cin>>n;

y=0;

for (i=1;i<=50;i=i++)

y=y+i/i+1;
cout<<" tong la:"<<y;

return 0;

}

# data[].attributes.body
#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 la:"<<p;

return 0;

}

# data[].attributes.body
#inclue <iostream>
unsing namespace std;
int main()
{
int n,i,P;
cout<<@Nhap n:@;
cin>>n;
int P=1;
for i:=1 to n do P:=P*i;
}
{
cout<<@P so tu 1 den n la:@<<P<<endl;
return0;
}
end.

# data[].attributes.body
#inclue <iostream>
using namespace std;
int main()
{
int n,i,S;
cout<<"Nhap n:";
cin>>n;
int S=1;
for i:=1 to n do S:=S+1;
}
{
cout<<" S la so tu 2 den n la:"<<S<<endl;
return0;
}

# data[].attributes.body
#inclue <iostream>
using namespace std;
int main()
{
int n,i,P;
cout<<"Nhap n:";
cin>>n;
int P=1;
for i:=1 to n do P:=P*i;
}
{
cout<<" P so tu 1 den n la:"<<P<<endl;
return 0;
}

# data[].attributes.body
1.
#inclue <iostream>
using namespace std;
int main()
{
for i:= 1 to 10 do
cout<<"Nhap i: ";
cin>> " CHAO BAN:";
}
end.

2.
#inclue <iostream>
using namespace std;

int main()
{
int n;
cout<<"Nhap so n:";
cin>> n;
cout<<"Tu so 1 den " << n << " la:";
for (int i = 1; i<=n; i++)
}
end.

{

# data[].attributes.body
#inclue <iostream>
using namespace std;
int main() {
int n,i,s;
long s = 1;
cout<<"Nhập giá trị vào số n: ";
s:=0; i:=1;
while i<= n
cin>> n"
for( int i = 1; i<=n; i++) {
s +=i;
}
cout<<"Tổng 1 + 2 + 3 +... + "<<n<<" là: "<<s;

cout<<"\n----------------------------\n";

}

# data[].attributes.body
Phan Đình Phát 11a1

# data[].attributes.attachment_link.title
Online C++ Compiler - online editor - Google Chrome 11_21_2021 7_57_12 PM

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int N,i;
cout<<"Nhap so N:";
cin>>N;
int P=1;
for(i=1;i<=N;i++)
{
P=P*i;
}
cout<<"Tich cac so tu 1 toi N la:"<<O<<endl;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int N,i;
cout<<"Nhap so N:";
cin>>N;
ins S=0;
for(i=1;i<=N;i+2)
{
S=S+i;
}
cout<<"Tong cac so 1+3+5+...+N la:"<<S<<endl;
return 0;
}

# data[].attributes.body
# include <iostream>
using namespace std;
int main()
{
int N,i;
cout<<"Nhap so N:";
cin>>N;
ins S=0;
for(i=2;i<=;i+2)
{
S=S+i;
}
cout<<"Tong cac so 2+4+6+...+N la:"<<S<<endl;
return 0;
}

# data[].attributes.body
#include <iostream>
uising namespace std;
int main()
{
int N,i;
cout<<"Nhap so N:";
cin>>N;
int S=0;
for(i=1;i<=N;i++)
{
S=S+i
}
cout<<"Tong cac so tu 1 toi N la:"<<S<<endl;
return 0;
}