Created
October 1, 2012 11:23
-
-
Save yrchen/3811058 to your computer and use it in GitHub Desktop.
2012 CE1001 A1-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int | |
main() | |
{ | |
int len = 0, width = 0; | |
cout << "Please enter the rectangle length: "; | |
cin >> len; | |
cout << "Please enter the rectangle width: "; | |
cin >> width; | |
cout << "Perimeter is: " << (len + width) * 2 << endl; | |
cout << "Area is: " << len * width << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment