Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  RECTANGLE
Language: C/C++
Code:
#include <cstdlib>
#include <iostream>

using namespace std;

int main (int argc, char* argv[])

{

      float width;
      float length;
      float area;
      float perimeter;
   
      cout<<"please enter the width:";
      cin>>width;

      cout<<"please enter the length:";
      cin>>length;

      area = width * length;
      perimeter = 2 * (length+width);

      cout<<"Area of the rectangle is =" 
      <<area<<"n";
      cout<<"perimeter of the rectangle is =" 
      <<perimeter<<"n";

      system ("pause");
      return EXIT_SUCCESS;
     
     
}
          
          
Comments: