C++ help: My code won't run, can't enter in any value in the terminal, can someone tell me what i'm doing wrong

#include <iostream>
using namespace std;
int main(void)
   int length,width,rectangle;
   cout<<"enter the value of length : ";
   cout<<"enter the value of width : ";
   cout<<"area of rectangle is : "<<rectangle;
   return 0;

[Running] cd "c:\Users\Shana Field\OneDrive\Desktop\Myprogram" && g++ perimeter.cpp -o perimeter && "c:\Users\Shana Field\OneDrive\Desktop\Myprogram"perimeter
enter the value of length :
[Done] exited with code=1 in 457.614 seconds

hi there, can you give some background information on your question?
For eg. is this an fCC challenge?
Can you provide a link to whatever it is you are working on?
Can you explain what you mean by “terminal”?

oh yes I can, it is C++

C++ Exercises: Find the Area and Perimeter of a Rectangle

](C++ Exercises: Find the Area and Perimeter of a Rectangle - w3resource)

I’m using VSC, it has a terminal so when you run your code, the terminal shows your results, once you compile your code.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.