DEV Community

Mohammed Salah
Mohammed Salah

Posted on

C++10th code (Area of circle)

    #include<iostream>
    #include<cmath>
    using namespace std; 
    int main()
    {
    float r ; 
cout<<"\n \t Enter the radius of Circle  : " ; 
cin>>r; 
cout<<" \n\n\n \t \t **********************************\n\n\n"; 
cout<<"\n\n The area of circle is = "; 
cout<< (M_PI*r*r)<<endl; 
cout<<"\n\n The area of circle is = ";
cout<<((M_PI)*pow(r,2));
cout<<"\n\n The area of circle is = ";
    cout<<((22/7)*r*r);
    cin.get();
return 0 ; 
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)