top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

WAP in C to find area and circumference of circle

+2 votes
449 views

Newbie to C, please help ??

posted Jan 30, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

use this function to calculate both area and circumference of a circle and to print:

void CalculateAreaCirculferenceOfCircle_techQH(double RadiusOfCircle)
{
  printf("Area of Circle=%lf",3.14*RadiusOfCircle*RadiusOfCircle);
  printf("Circumference of Circle=%lf,2*3.14*RadiusOfCircle);
}

else you want a function then try :

double CalculateArea_TechQH(double RadiusOfCircle)
{
 return 3.14*RadiusOfCircle*RadiusOfCircle;
}

double CalcuateCircumferenceOfCircle(double RadiusOfCircle)
{
  return 2*3.14*RadiusOfCircle;
}
answer Apr 28, 2016 by Shivam Kumar Pandey
Similar Questions
0 votes

WAP to find the minimum number of swaps required for arranging pairs adjacent to each other?

Input:
pairs[] = {1->3, 2->6, 4->5} // 1 is paired with 3, 2 with 6 ...
arr[] = {3, 5, 6, 4, 1, 2}

Output:
2
{3, 1, 5, 4, 6, 2} by swapping 5 & 6, and 6 & 1

0 votes

I want to write a c program where I can count no of line, no of blank lines, no of commented lines and no of lines ending with semicolon, please help!!!

...