Please plz plz i need help

Pages: 12
zereo do you have a problem with me ?!!?!! ...relax...dear.'s written on C++ Book pearsn...and i cant use what he gave me because it my 3rd week i c++ so im not bill gates to use for and pow because i dont know it. All what i was want some ideas to not copy and patse codes...!! anw sry dear :)...!
double pi=0.0 i
int N,
int d=1;
int i=1:
cout<< "enter num of terms":
{ (if i%2==1)
else pi-=4.0/d;
Last edited on
This page explains both the while loop and the for loop, with examples. These can be considered some of the basic building blocks of any program, so its worth getting familiar with these ideas before returning to the original question.

Many Thanks for your reflections.
I'm at the beginning of C++ programming.
So any idea is good for me from which I can learn new things.


Also the Leibniz method for calculating PI does not converge very well - so you need a lot of terms to get relatively few decimal places. That is why it didn't seem to work when you ran the code the first time.

Hope all goes well.
If you can't do something with your current level of understanding keep learning and try later.
Topic archived. No new replies allowed.
Pages: 12