//WAP TO CALCULATE AREA & VOLUME USING FUNCTION
#include<conio.h>
#include<iostream.h>
int sa(int,int,int);
int vol(int,int,int);
void main()
{
clrscr();
int l,b,h;
cout<<"Enter length,breadth & height::";
cin>>l>>b>>h;
cout<<"Surface Area::"<<sa(l,b,h)<<endl;
cout<<"Volume::"<<vol(l,b,h);
getch();
}
int sa(int x,int y,int z)
{
int sar=2*(x*y+x*z+y*z);
return(sar);
}
int vol(int x,int y,int z)
{
int vols=x*y*z;
return(vols);
}

No comments:
Post a Comment