#include "stdafx.h"
#include "conio.h"
#include "stdio.h"
#include "iostream"
using namespace std;
void Area_1();
void Area_2();
void Area_3();
int _tmain(int argc, _TCHAR* argv[])
{
Area_1();
Area_2();
Area_3();
getch();
}
void Area_1()
{
float a,r,p; ////// a is area , r is radius and p is pi ( 3.14 )
p=3.14;
cout<<"enter radius1"<<endl;
cin>>r;
a=p*r*r;
cout<<"a1="<<a<<endl;
}
void Area_2()
{
float a,r,p;
p=3.14;
cout<<"enter radius2"<<endl;
cin>>r;
a=p*r*r;
cout<<"a2="<<a<<endl;
}
void Area_3()
{
float a,r,p;
p=3.14;
cout<<"enter radius3"<<endl;
cin>>r;
a=p*r*r;
cout<<"a3="<<a<<endl;
}
0 comments :
Post a Comment