fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int length, width, area;
  6.  
  7. cout << "This program calculates the area of a ";
  8. cout << "rectangele.\n";
  9. cout << "Enter the length and width of the rectangle ";
  10. cout << "separated by a space.\n";
  11. cin >> length >> width;
  12. area = length * width;
  13. cout << "The area of the rectangle is " << area << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
This program calculates the area of a rectangele.
Enter the length and width of the rectangle separated by a space.
The area of the rectangle is 489206032