Your area calculation is wrong, area of circle is pir^2, but you have pir. And if you had checked what your area values came out as you would have seen that.
More Related Contents:
- identifier 'n' is undefined [closed]
- Code in .cpp file [closed]
- What is array to pointer decay?
- How can I add reflection to a C++ application?
- What can I do with a moved-from object?
- Why can in-class initializers only use = or {}? [duplicate]
- Inline functions vs Preprocessor macros
- Developing C wrapper API for Object-Oriented C++ code
- C++’s most vexing parse again [duplicate]
- Difference in floating point arithmetics between x86 and x64
- Endless loop in C/C++ [closed]
- How to include header files in GCC search path?
- constexpr overloading
- Best documentation for Boost:asio?
- how do you insert the value in a sorted vector?
- Using assignment as a condition expression?
- How Non-Member Functions Improve Encapsulation
- Do class functions/variables have to be declared before being used?
- Using Quaternions for OpenGL Rotations [duplicate]
- track C++ memory allocations
- Understanding the List Operator (%) in Boost.Spirit
- C++ namespaces advice
- Why explicitly delete the constructor instead of making it private?
- What is “strip” (GCC application) used for?
- Check the file-size without opening file in C++?
- Get signatures of exported functions in a DLL
- static variable in the class declaration or definition?
- Which is faster/preferred: memset or for loop to zero out an array of doubles?
- What is the cyclic dependency issue with shared_ptr?
- Does C++11 unique_ptr and shared_ptr able to convert to each other’s type?