Write a Program that input value of the radius of a circle from the user and calculate Circumference of the circle.
Here is the solution of that problem , In this program we will get value of radius of circle and program will find circle’s circumference by using formula Circumference = 2*radius*3.14
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#include<iostream> using namespace std; int main() { float cir; // cir = cicumference float rad; // rad = radius cout<<"Enter radius of circle : "; cin>>rad; cir= 2 * 3.14 * rad; //Circumference Formula cout<<"Circumference of circle = "<<cir; return 0; } |
Output: