#include <iostream>
#include <math.h>
using namespace std;
int main(){
int i=1;
//int a=0;
double sum=0;
int a=pow(-1,3);
for(double i=1;i<=100;i++)
{
double temp=0;
temp=pow(-1,i+1)*1/i;
cout<<"第"<<i<<"项:"<<temp<<endl;
sum=temp+sum;
}
cout<<"和为"<<sum<<endl;
return 0;
}