adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Calculate area and circumference of the circle in C++ program

Calculate area and circumference of the circle  in C++ program.

#include<iostream.h>
#include<conio.h>
 void main()
  {
  float r;
  clrscr();
  cout<<"Enter a radius:-";
  cin>>r;
  float area=22.0/7*r*r;
  float cm=2*22.0/7*r;
  cout<<"Area of circle="<<area;
  cout<<"\nCircumference of circle="<<cm;
  getch();
  }

Output:-

Post a Comment

0 Comments