Assignments » Variable, Operator and Expression » Set1 » Solution 8

Write a program to calculate area of circle.

#include<iostream>
using namespace std;

int main()
{
	float r,area;
	cout<< "\nEnter radius of circle : ";

	cin>>r;
	area = 3.14*r*r;

	cout<<"Area of circle : "<<area;
	
	

	return 0;
}

Enter radius of circle : 7
Area of circle : 153.86