Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "math.h"
- #include <iostream>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- int i=0;
- double dlina=1500, rashod=2, obyom=600, predel, pereezdi=0, z, n, bac=0;
- predel=dlina/(obyom/rashod);
- cout<<"predel="<<predel<<"\n";
- while(pereezdi<predel)
- {
- z=(2*i)+1;
- n=1/z;
- pereezdi=pereezdi + n; //(1/((2*i)+1));
- bac = bac + 1;
- //cout<<"pereezdi="<<pereezdi<<"\n"<<"i="<<i<<"\n"<<"znamenatel="<<z<<"\n"<<"to chto + ="<<n<<"\n"<<"bacov ="<<bac<<"\n"<<"\n" ;
- i++;
- }
- cout<<"pereezdi="<<pereezdi<<"\n"<<"i="<<i<<"\n"<<"znamenatel="<<z<<"\n"<<"to chto FEDUARD PIDOR + ="<<n<<"\n"<<"bacov ="<<bac<<"\n"<<"\n" ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement