write a c program to find area and circumfearence of a circle
/* c program to find area and circumfearence of a circle*/
/* author: sai date:1-4-2015 */
#incl#include<stdio.h>
int main()
{
int radius;
float PI = 3.14,area,ci;
printf("\nEnter radius of circle");
scanf("%d", &radius);
area = PI * radius * radius;
printf("Area of circle %f\n",area);
ci = 2 * PI * radius;
printf("Circumference %f\n",ci);
}
/* c program to find area and circumfearence of a circle*/
/* author: sai date:1-4-2015 */
#incl#include<stdio.h>
int main()
{
int radius;
float PI = 3.14,area,ci;
printf("\nEnter radius of circle");
scanf("%d", &radius);
area = PI * radius * radius;
printf("Area of circle %f\n",area);
ci = 2 * PI * radius;
printf("Circumference %f\n",ci);
}
No comments:
Post a Comment