Approximate Pi

Thanks but I've figured out how to fix it on my own.
Last edited on
Put that in code tags, not subscript. Not only is it illegible to begin with but the reduction in letter size is even worse. Unless you intend to write something in fine print (usually as a joke of some kind) you should type in full size.
Now then, what are your errors? What is going wrong?
What exactly are the errors?
closed account (jwC5fSEw)
This probably isn't the only problem, but your variables (trial 1, etc) have spaces in them, which I'm pretty sure won't work.
Could someone please show me how to fix this problem. I have the errors and the program put up.Thank you. I appreciate your help.
Wrong tags. http://www.cplusplus.com/articles/firedraco1/
And the tiny text in that error box is absolutely impossible to read... I'd try to help you at this point if I could, but I just can't see it.
And you can't have a space in a function's name either. Omit all spaces in names.
 
cout<< "Trial2 is: "<< trial<< endl;

there should be a 2 following the second trial
it should be
cout<< "Trial2 is: "<< trial2<< endl;
I fixed the trial2 error. thanks. Could someone help me fix my program please. I want my code. Sorry about making the errors look small. I fixed how it looks now. I really need to fix this. I've been working on fixing it on my own for the past 2days and I can't. I would really appreciate it if someone fixed my code and posted it. Thank you.
Last edited on
I just have some quick advice: the variable i should not be float or double. That causes risks of floating point inaccuracy that will never come up in integer arithmetic. Almost always, counters should be integers.
Also, on the line where you call calc the second time, you have no call brackets. (This is why you use code tags and not output. Code tags have line numbers.) I think that is the source of a lot of the errors, but I'm just not patient enough to count lines for the rest of them. Try changing that and see what happens.
Last edited on
also please update the code and the errors when you fix things so it's easier to tell what has and hasn't been fixed
Last edited on
also why do you have the variable trial3 yet never use it
Topic archived. No new replies allowed.