All pastes #915069 Raw Edit

Stuff

public cpp v1 · immutable
#915069 ·published 2008-02-23 14:09 UTC
rendered paste body
//===================================================================// napisac program liczacy sume nieskonczonego szeregu 1/(x^2)//===================================================================#include <cstdlib>#include <iostream>#include <math.h>using namespace std;int main(){    cout<<"Ile zliczyc wyrazow ?"<<endl;    int ile;    cin >> ile;    double suma = 0;    for (int x=1; x<=ile; x++){    suma += 1/pow(x,2);    }        cout<<"Suma "<<ile<<" wyrazow szeregu 1/(x^2) wynosi: "<<suma<<endl;        system("PAUSE");    return 0;}