Ok I'm writing a program. The program works and all but the cin.get() is not keeping the console window open. I've been looking at this program for a while and have talked with others but we can not figure out what is wrong. I am using Code Blocks for my compiler. If anyone can point the obvious out for me it would be much appreciated.
Code:
#include <iostream>
using namespace std;
float width;
float length;
float perimeter;
float area;
int main()
{
cout << "Please input the length of the rectangle in centimeters\n";
cin >> length;
cout << "Please input the width of the rectangle in centimeters\n";
cin >> width;
perimeter = 2 * (width + length);
area = width * length;
cout << "The perimeter is " << perimeter << " centimeters\n";
cout << "The area is " << area << " square centimeters\n";
cin.get();
return(0);
}