#include<iostream>
using namespace std;

int main ()
{

    char a;

    double length;
    double width;
    double Area;

    cout<<"Please\n";

    cout<<"\t1- Enter \"S\" or \"s\" to calculate the square area\n";
    cout<<"\t2- Enter \"R\" or \"r\" to calculate the rectangle area.\n";
    cout<<"\t3- Enter any Key to Exit\n";


    cout<<"Please enter the length of square";
    cin>>length;

    cout<<"Please enter the length and the width of square";
    cin>>length;
    cin>>width;


if(a=='S'||a=='s')
    {
        cout<<"Area of square=" ;

        Area = length*length;
        cout<<Area;
    }     

  if(a=='R'||a=='r')
{
    cout<<"Area of rectangle=";
    Area = width*length;
    cout<<Area;
}
  {
  else
      cout<<"Thank you";
  }


    system("pause");
    return 0;
}
This question has already been answered. Start a new discussion instead.