Power By Dholu Production

Responsive Ads Here

Tuesday, April 24, 2018

WAP for function with default arguments|C++


CODE:
#include<iostream>
using namespace std;

float ar(float R ,float Pi=3.14)
{
 return(Pi*R*R);
}

int main()
{
    int r;
    cout<<"To Find Area Of Circle \n Enter The Value Of Redious :";   
    cin>>r;
    cout<<"Area Of Circle Is :"<<ar(r)<<endl;
    return 0;
}