All pastes #915091 Raw Edit

Stuff

public cpp v1 · immutable
#915091 ·published 2008-02-23 14:25 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(int argc, char *argv[]){    cout<<"Ile zliczyc wyrazow ?"<<endl;    unsigned 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;}