GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 06-Apr-2007, 09:10
tootoo tootoo is offline
New Member
 
Join Date: Apr 2007
Posts: 4
tootoo is an unknown quantity at this point
Question

Circumference of the square


Write C++ program that compute the circumference of the square in this drawn shape. The program asks the user to enter the area of the circle.



Note: that the input must entered in meter and then the circumference should be displayed in centimeter.
  #2  
Old 06-Apr-2007, 10:07
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,627
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: the circumference of the square


Quote:
Originally Posted by tootoo
Write C++ program that compute the circumference of the square in this drawn shape.

Circumference refers to a circle. I think the proper term for the square would be "perimeter". (Actually, the circumference is usually defined to be the perimeter of a circle. At least it was when I studied it somewhere around the middle of the 20th century.)

Anyhow:

Radius of circle = square root of ((Area of circle) divided by Pi)

Diameter of circle = (Radius of circle) * 2

Length of side of square = Diameter of circle

Perimeter of square = 4 * (Length of side of square)

Number of centimeters = 100 * (Number of meters)

Regards,

Dave
 
 

Recent GIDBlog2nd Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latin square Knight81 C Programming Language 3 10-Oct-2007 13:10
Shapes Functions Version 2 - Arrays! Cecil C Programming Language 1 09-Jul-2006 20:39
Latin square Knight81 CPP / C++ Forum 1 23-May-2006 23:14
OT: nth power square root math question earachefl CPP / C++ Forum 1 18-Feb-2006 07:45
Convert the input into square yards pjpav Java Forum 1 08-Oct-2005 07:43

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:26.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.