cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
please help with my homework
please help with my homework
Feb 11, 2013 at 5:10am UTC
fiestaboy
(3)
B. Circle in a Square
Write a C++ program that will ask the user to enter the area of a square. Then
the program will display the biggest area of a circle that will fit in a given
square. Using math.h library is not allowed.
Feb 11, 2013 at 5:39am UTC
MiiNiPaa
(8886)
Using math.h library is not allowed.
Can you use
<cmath>
then? :)
Real answer:
if "
a
" is a square side then:
area of the square (as) =
a * a
area of incircle (ac) =
Pi * (a * a)/4
Find quotent of incircle area and square area. (ac/as)
Given
as
and knowing
ac/as
find
ac
Last edited on
Feb 11, 2013 at 7:00am UTC
Topic archived. No new replies allowed.