Calculate the area of circle in C++.


  #include<iostream.h>

#include<conio.h>

int main( )

{

int r;

float a;

cout<<"enter the Radius:";

cin>>r;

a=3.14159*r*r;

cout<<"Area is:"<<a;

getch( );

return 0;

}

To Run:

















Output:



No comments:

Post a Comment

theengineerschoice01@gmail.com