Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Perimeter dailiesnumber2.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int width;
- int length;
- cout << "this program calculates area and perimeter, please enter in width" << endl;
- cin >> width;
- cout << "Now please enter in the length" << "\n";
- cin >> length;
- int area = width* length;
- int perimeter = length * 2 + width * 2;
- cout << "area is " << area << "and perimeter is " << perimeter << "\n";
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment