Skip to content

Instantly share code, notes, and snippets.

@Jordach
Last active Dec 27, 2015
Embed
What would you like to do?
#include <iostream>
using namespace std;
int main()
{
int length, width, perimeter, area;
cout << "Length = ";
cin >> length;
cout << "Width = ";
cin >> width;
perimeter = 2*(length+width);
area = length*width;
cout << "\nPerimeter is: " << perimeter;
cout << "\nArea is: " << area;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment