donmike25

ecp1016 tutorial 2(2)

Jun 27th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int x;
  5.     float pi,radius,area,circumference;
  6.     printf("Enter the radius of the circle:");
  7.     scanf("%d",&x);
  8.     pi=3.14;
  9.     area = pi*x*x; 
  10.     printf("The area of the circle %.2f\n",area);
  11.     circumference = 2*pi*x;
  12.     printf("The circumference of the circle %.2f",circumference);
  13.    
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment