Skip to content

Instantly share code, notes, and snippets.

@Jordach
Last active December 27, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jordach/7318017 to your computer and use it in GitHub Desktop.
Save Jordach/7318017 to your computer and use it in GitHub Desktop.
#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