
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Find Circumference of a Circle in C++
In this tutorial, we will be discussing a program to find circumference of a circle.
For this we will be provided with the radius of the circle. Our task is to calculate and print the circumference of that circle.
Example
#include<bits/stdc++.h> using namespace std; #define PI 3.1415 double circumference(double r){ double cir = 2*PI*r; return cir; } int main(){ double r = 5; cout << "Circumference : " << circumference(r); return 0; }
Output
Circumference : 31.415
Advertisements