Computer Science, asked by balvirraj6386, 1 year ago

Write a program to calculate area of circle in notepad++

Answers

Answered by Prathamattri2062
0
I think you want a C++ program
It's as follows:

NOTE: I AM WRITING THIS PROGRAM IN BOTH FORMAT i.e. for Dev C++ and for simple DOSBOX.

#include<iostream> //for dev c++
#include<math.h>

using namespace std;

const float pi= 3.141592653589793238462643 ;
int main(void)
{
float r,Ar;

cout<<"\nEnter radius of circle"<<"\nRADIUS = ";

cin>>r;

Ar = pi*pow(r,2);

cout<<"The area of circle is "<<Ar;

return 0;
}




And




#include<iostream> //for DOSBOX
#include<conio.h>
#include<math.h>

const float pi= 3.141592653589793238462643 ;
int main(void)
{
float r,Ar;

cout<<"\nEnter radius of circle"<<"\nRADIUS = ";

cin>>r;

Ar = pi*pow(r,2);

cout<<"The area of circle is "<<Ar;

return 0;

getch( );
}
Similar questions