while(x <= coba){
if (x% 2 == 1){
Cek++;
}
else{
Cek+=2;
}
cout<< cek << endl;
x++;
}
return 0;
}
if cek =5
i need 1,2,4,7,8
but my code still 2,4,5,7,8

Please can anyone solve the following two questions for me its really very difficult same as given questions through c++ …
Sum=1-1/1!+2/2!-3/3!…..n/n!
Sum=x-x^3/3!+x^5/5!-x^7/7!+….x^n/n!

1/x+2/x×x+……….n/x×n

Answer of the coading

program in c++ to find sum of series sum=1+(1+2)+(1+2+3)+……………..n

#include

#include

void main()

{

int i,j,n,sum=0;

clrscr();

n=10;

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

{

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

{

sum+=j;

}

}

cout<<"Sum: "<<sum;

getch();

}

bhai may nay ek program solve karna hy jis may hum nay ye series banana 1+1/4+1/8+1/12+…1/100

kay ap bata saktay ho kaisay maloom karni hy c++ may

#include

using namespace std;

void main()

{

float num=0;

for (float i=4; i<=100; i=i+4)

{

num=num+(1/i);

}

num=num+1;

cout << num;

system("pause");

}

Num should start from 1.

leave first term take 1/4 common and then execute the for loop

bro what is the program for this series

1+1+2+1+2+3+1+2+3+4+…………..1+2+3+………+n

#include

#include

void main()

{

int i,j,n,sum=0;

clrscr();

cout<>n;

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

{

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

{

sum+=j;

if(j==n)

{

cout<<j;

}

else

{

cout<<j<<"+";

}

}

}

cout<<"\nTotal Sum="<<sum;

getch();

}

can you help me with

#include

#include

using namespace std;

int main(){

int cek=1, x=1, coba;

cin >> coba;

while(x <= coba){

if (x% 2 == 1){

Cek++;

}

else{

Cek+=2;

}

cout<< cek << endl;

x++;

}

return 0;

}

if cek =5

i need 1,2,4,7,8

but my code still 2,4,5,7,8

Please can anyone solve the following two questions for me its really very difficult same as given questions through c++ …

Sum=1-1/1!+2/2!-3/3!…..n/n!

Sum=x-x^3/3!+x^5/5!-x^7/7!+….x^n/n!

well

1+3+5+7-6+8+10+12-11+13+15+17-16+18+20+22………..n

sum of series

anybody can solve this

3×(5+18/2) I want a program in c++

2/1*2/3*4/3*4/5…..2n/2n-1

some one to help me on this question using c++