You should be more specific or/and show part of your code concerning the problem. May be you mean a menu to select operation...then I suggest this:
Code:
// function declarations goes here
int main()
{
int selection=0;
do
{
selection=menu(); //access function menu to get operation
if (selection==1)
//area of square
else
if(selection==2)
//area of rectangle
//note that it is better if your create another function
//to tackle the area operation.
.
.
.
}while( selection!=3 );
return 0;
}
int menu()
{
int choice=0;
do
{
printf("\n\nMENU\n_______\n\n");
printf("1.Area of square\n2.Area of rectangle\n3.Exit");
printf("\n\nEnter selection number: ");
scanf("%d",&choice);
if ((choice==1)||(choice==2)||choice==3)
return choice;
else
{
printf("\n\nInvalid Request!\n");
choice=0;
}
}
while(choice==0);
}