Computer Science, asked by swarupsubho, 8 months ago

Write a C program to find area and perimeter of circle.

Answers

Answered by Arceuzvx
62

#include<stdio.h>

 

int main() {

 

  int rad;

  float PI = 3.14, area, ci;

 

  printf("\nEnter radius of circle: ");

  scanf("%d", &rad);

 

  area = PI * rad * rad;

  printf("\nArea of circle : %f ", area);

 

  ci = 2 * PI * rad;

  printf("\nCircumference : %f ", ci);

 

  return (0);

}

Answered by anaftaj11
1

#include<constream.h>

void main ();

{

clrscr();

float area, r, cir;

cout<<"\nEnter radius";

cin>>r;

area=3.14*r*r;

cir=2*3.14*r;

cout<<"\nArea="<<area;

cout<<"\ncircumference="<<cir;

getch();

}

Similar questions