Calculate Area of a Circle using math.h library: C

preview_player
Показать описание

Formula for calculating Area of a circle is PI * radius * radius. We take value of radius from user and using above formula calculate area of the circle and output result to the console window. Since we’re using math.h library file we use M_PI and pow() methods for the expression.
i.e., area = M_PI * pow(radius, 2);

C Programming: Beginner To Advance To Expert
Рекомендации по теме