Write a cpp program to calculate area of a circle?

#include<iostream.h>
#include<conio.h>
void main()
{
 clrscr();
int r;
 cout<<"Enter radius of circle: ";
 cin>>r;
 cout<<"Area of circle is: "<<3.14*r*r;
 getch();
}

Ourput:


/* For IDK Code Block */

#include<iostream>
#include<conio.h>
using namespace std;
main()
{
 int r;
 cout<<"Enter radius of circle: ";
 cin>>r;
 cout<<"Area of circle is: "<<3.14*r*r;
 getch();
}

Output:


Comments

Popular posts from this blog

Larch Soft Pvt. Ltd. - Best Website & Hosting Provider