This program will out put different geometric figures enlisted there. But i am having hard time at last part and it also tells me I got it wrong in menu(). Someone please help me out. Thanks a lot
//complier directives
#include<iostream>
#include<iomanip>
#include<cstdlib>
using namespace std;
//function prototypes
void Rectangle(int Lengthf, int Widthf, char Symbolf);
void Square(int Sidef, char Symbolf);
void Right_Triangle(int Heightf, char Symbolf);
void Equilateral_Triangle(int Heightf, char Symbolf);
void Diamond(int Halfheightf, char Symbolf);
//main program
int main ()
{
//local identifiers
int Length, Width, Height, Halfheight, DesignCode,done;
char Symbol;
//input module
do
{
DesignCode = menu();
switch(DesignCode)
{
case 1;
cout<<"Please enter the length of the sides of the square:\t";
cin>>Length;
cout<<"Please enter the design character for the square:\t";
cin>>Symbol;
Square(Length, Symbol);
break;
case 2;
cout<<"Please enter the Length and Width of the rectangle seperated by a space:\t";
cin>>Length>>Width;
cout<<"Please enter the design character for the square:\t";
cin>>Symbol;
Rectangle(Length,Width,Symbol);
break;
case 3;
cout<<"Please enter the Height of the Right Triangle:\t";
cin>>Height;
cout<<"Please enter the design character for the square:\t";
cin>>Symbol;
Right_Triangle(Height,Symbol);
break;
case 4;
cout<<"Please enter the Height of the Equilateral Triangle:\t";
cin>>Height;
cout<<"Please enter the design character for the square:\t";
cin>>Symbol;
Equilateral_Triangle(Height,Symbol);
break;
case 5;
cout<<"Please enter the Halfheight of the Diamond:\t";
cin>>Halfheight;
cout<<"Please enter the design character for the square:\t";
cin>>Symbol;
Diamond(Halfheight,Symbol);
break;
case 6;
done=1;
}//end of switch
if(!done)
{
system("PAUSE");
system("CLS");
}
}while(!done);
return 0;
}//end of program
//funtion defination
//function heading
int menu()
{
cout<<setw(57)<<"Welcome to Acorn's World of Shapes":\n";
cout<<"Please setect your favorite shapes from the list below:\n";
cout<<"\t:\t\n";
cin>>choice;
1. Rectangle
2. Square
3. Right_Triangle
4. Equilateral_Triangle
5. Diamond
}
void Rectangle(int Lengthf, int Widthf, char Symbolf)
{
for(int i=0, i<Lengthf, i++)
for(int j=0, j<Widthf, j++)
cout<<Symbolf;
}
void Square(int Sidef, char Symbolf)
{
for(int i=0, i<Sidef, i++)
for(int j=0, j<Sidef, j++)
cout<<Symbolf;
}
void Right_Triangle(int Heightf, char Symbolf)
{
for(int i=0, i<Heightf, i++)
for(int j=0, j<Lengthf, j++)
cout<<Symbolf;
}
void Equilateral_Triangle(int Heightf, char Symbolf)
{
for(int i=0, i<Heightf, i++)
for(int j=0, j<Sidef, j++)
cout<<Symbolf;
}
void Diamond(int Halfheightf, char Symbolf)
{
for(int i=0, i<Halfheightf, i++)
for(int j=0, j<Sidef, j++)
cout<<Symbolf;
}
return choice;