return x;
}
void main()
{ clrscr();
int z,a,a1;
cout<<"\nEnter the length and breadth of the rectangle:\n\n ";
cin>>l>>b;
cout<<"\nAREA IS : "<<o<<endl;
cout<<"----------------------------------------------------------------"<<endl;
cout<<"\nEnter the side of the square:\n\n ";
cin>>a;
cout<<"\nAREA IS : "<<a1<<endl;
cout<<"----------------------------------------------------------------"<<endl;
cout<<"Enter the 3 sides of the triangle :\n\n ";
cin>>q>>w>>e>>r;
cout<<"AREA IS : "<<x<<endl;
getch();
}
#include<iostream.h> // not <iostream.h>
//#include <conio.h> I am not on Windows and can't compile this
#include<cmath> // <math.h> is meant for C, not C++
float area(int,int,int) // missing parameter names
{
float arearec(int l,int b); // This is a function declaration, and... there is no matching function
int l,b,o;
o=l*b; // YOu haven't initialized l or b yet
return o; // you haven't done any math! What are you returning?
}
{ // Missing the function header. This is code in the global scope, that's not allowed
int areasq(int a); // Function declaraion... and there is no matching function
int a1,a;
a1=a*a; // You haven't initialized a yet
return a1;
}
{
float areatri(float q,float w,float e);
float q,w,e;
int x;
x=sqrt(q(q-w)(q-e)(q-r);
return x;
}
void main()
{
//clrscr(); windows only
int z,a,a1;
cout<<"\nEnter the length and breadth of the rectangle:\n\n ";
cin>>l>>b;
cout<<"\nAREA IS : "<<o<<endl;
cout<<"----------------------------------------------------------------"<<endl;
cout<<"\nEnter the side of the square:\n\n ";
cin>>a;
cout<<"\nAREA IS : "<<a1<<endl; // you didn't write to al yet.
cout<<"----------------------------------------------------------------"<<endl;
cout<<"Enter the 3 sides of the triangle :\n\n ";
cin>>q>>w>>e>>r; // you haven't defined any of these variables
cout<<"AREA IS : "<<x<<endl; // x hasn't been defined or driven in main
//getch(); windows only
}