Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include<stdio.h>
  2. double diameter(double radius)
  3. {
  4. return (2*radius);
  5. }
  6. double circumference(double radius)
  7. {
  8. return (2*PI*radius);
  9.  
  10. }
  11. double area(double radius)
  12. {
  13. return (2*radius*radius);
  14. }
  15. int main()
  16. {
  17. double are,circ,dia,radi;
  18. scanf("%lf",&radius);
  19. printf("%d\n",radius of the circle);
  20. dia=diameter(radius);
  21. circ=circumference(radius);
  22. are=area(radius);
  23. printf("Diameter of the circle=%lf\n",dia);
  24. printf("Circumference of the circle=%lf\n",circ);
  25. printf("Area of the circle=%lf\n",are);
  26. return 0;
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement