Write a program to find the circumference of a circle

Leave a Comment


Write a c++ program to calculate the cricumference of a circle.


For this program we need the value of radius so we take the value of r from user then calculate the circumference of a circle.



#include<iostream.h>  
 #include<stdio.h>  
    
void main() 
{  
  
 float r,circumference;  // Declare variable 

cout<<"Enter radius of a circle";
cin>>r;  


circumference=2*3.14*r;  
cout<<"circumference of a circle is"<<circumference;  
    
 getch();  
  
}  


C/C++ programs


click here
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment