fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int length, breadth;
  7. length = 20;
  8. breadth = 10;
  9. double area;
  10. //the object is a rectangle
  11. area = length * breadth;
  12. cout << "The area of the rectangle is " << area << endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
The area of the rectangle is 200