Friday

April 18, 2014

April 18, 2014

Posted by **sonnytsn** on Wednesday, January 23, 2008 at 2:57pm.

/*Circle Are program

Calculates the area of a circle using the formula A=pi * r * r

Sonny Hinh, 1/23/08

#include <iostream.h>

int main()

{

cout << "-Calculate the area of a circle-" << endl;

cout << end;

cout << "Radius = " << 10 << endl;

cout << "Area = " << (3.14*10*10) << endl;

return 0;

}

- C++ Programming -
**Quidditch**, Wednesday, January 23, 2008 at 4:01pmDid you intend for the line:

cout<<end;

to really be:

cout<<endl;

- C++ Programming -
**sonnytsn**, Wednesday, January 23, 2008 at 5:08pmi tried and it didn't work :<

and you email me a uncompiled answer?

sonnytsn1_@_gm_ai_l._co_m

- C++ Programming -
**Quidditch**, Wednesday, January 23, 2008 at 5:44pmI did a quick check using MS VS2005. The following compiles correctly. Changing the line:

cout<<endl;

to:

cout<<end;

gives a compile error

--------------------------------

Below compiles using VS2005

--------------------------------

#include <tchar.h>

#include <iostream>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])

{

cout << "-Calculate the area of a circle-" << endl;

cout << endl;

cout << "Radius = " << 10 << endl;

cout << "Area = " << (3.14*10*10) << endl;

return 0;

}

- C++ Programming -
**Quidditch**, Wednesday, January 23, 2008 at 5:46pmmissed the end

-------------------------

#include <tchar.h>

#include <iostream>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])

{

cout << "-Calculate the area of a circle-" << endl;

cout << endl;

cout << "Radius = " << 10 << endl;

cout << "Area = " << (3.14*10*10) << endl;

return 0;

}

- C++ Programming -
**Quidditch**, Wednesday, January 23, 2008 at 5:48pmI guess the double blank lines caused the posting applet to clip the last two lines. Here they are finally, I hope.

--------------------

return 0;

}

- C++ Programming -
**Quidditch**, Wednesday, January 23, 2008 at 5:50pmNope, for some reason the last lines which are not posting.

Anyway, the last lines are the same as your source.

**Related Questions**

c programming - To see how the four steps of the software development procedure ...

c# programming - To see how the four steps of the software development procedure...

math - A circle has an area of 25 pi cm^2.If a circle is drawn within that ...

object oriented programming 1 - write a c++ program that calculates the area of ...

8th grade math - circle A has a raduis that is twice the length og the raduis of...

math - the radius of a circle when the numeric values of the circumference and ...

Math - Cutting a circle into equal sections of a small central angle to find the...

math - The number of square units in the area of circle P is equal to the number...

7th grade masth asap hurry plz ms.sue somebody plz - The area of a circle is ...

math - The area of circle c is 81 pi . if the radius of the circle is doubled, ...