Prog 14 write a program to find
area of circle and rectangle using inline function
#include<iostream .h>
#include<conio.h>
inline float
cir(float r)
{
return (3.14*r*r);
}
inline float
rec(float l,float b)
{
return (l*b);
}
void main()
{
clrscr();
cout<<"\n circle
= "<<cir(3.6);
cout<<"\nR ectangle = "<<cir(3,3.2);
cout<<"\n
}
No comments:
Post a Comment