Calculate the area of circle using c program, C/C++ Programming

Calculate the area of circle using c program:

const float Pi = 3.1415926;

 

inline float area(const float r) {return Pi * r * r;}

 

main()

{

   float radius;

 

   cout << "Enter the radius of a circle: ";

   cin >> radius;

   cout << "The area is " << area(radius) << "\n";

   return 0;

}

 

 

Posted Date: 10/18/2012 6:46:12 AM | Location : United States







Related Discussions:- Calculate the area of circle using c program, Assignment Help, Ask Question on Calculate the area of circle using c program, Get Answer, Expert's Help, Calculate the area of circle using c program Discussions

Write discussion on Calculate the area of circle using c program
Your posts are moderated
Related Questions
#decode the code

Part 1 Assignment:  develop a calculator in MASM. Text chapters covered:  1 through 4, 5.4, 5.5, 6.3, 7.4 You will develop a "calculator" algorithm in MASM using reverse-


write a program to generate padovan sequence in c++

Semaphore is used to synchronize processes. whereas mutex is used to give synchronization among threads running in the similar process.

I need Asp .net Facebook app project completion Project Description: We are urgently seeking a few remaining items to be completed, and the project to be deployed to live.

Define the Data File in C Programming? Many applications needs that information can written to or read from an auxiliary memory device. Such information is stock up on the memo

what is the difference between call by reference and call by pointer method?

Problem Description Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

# Dear I want help to programmer that write C++ code for my small project as soon as posible If we can help me?..