fork download
  1. #include <stdio.h>
  2.  
  3. float calcAreaofSector(float radius); // define function
  4.  
  5. int main(void) {
  6. float radius = 14; // define radius as 14
  7. float Sector = calcAreaofSector(radius); // define Square area
  8. float area; // output looking to achieve
  9. printf("%f", Sector); // print output
  10. // your code goes here
  11. return 0;
  12. }
  13.  
  14.  
  15. // **************************************************
  16. // Function: calcAreaOfSquare
  17. //
  18. // Description: Calculates the area of a Square
  19. //
  20. //
  21. // Parameters: length - length of the Square
  22. // Square - Definition of shape
  23. //
  24. // Returns: area - area of Parallelogram
  25. //
  26. // ***************************************************
  27.  
  28. float calcAreaofSector(float radius)
  29. {
  30.  
  31. float area; // float area of the Square
  32.  
  33.  
  34. area = .5 * radius * radius * 0; // Area of Sector is 1/2(radius * radius)*height
  35.  
  36.  
  37. return area;
  38.  
  39. } //calcAreaOfSector
  40.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
0.000000