Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi here is a c++ program used to guess the value of pi. However, i encountered some troubles. If you put 0, it gives 4,
Hi here is a c++ program used to guess the value of pi. However, i encountered some troubles. If you put 0, it gives 4, which is correct. But as for the other numbers, it just gives back zero. I couldn't find the error and I am pretty sure my logic is correct. Can anyone run this and detect the problem? Btw enter (-1) means to exit the program.
#include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started