Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Program: rectangulo.cc
- // Author: Yoan Pinzon
- // Date: Agosto 30, 2006
- #include <iostream>
- using namespace std;
- int main()
- {
- int base, altura, area, perimetro;
- cout << "Area del rectangulo" << endl;
- cout << "===================" << endl;
- cout << "Entre el valor de la base = "; cin >> base;
- cout << "Entre el valor de la altura = "; cin >> altura;
- area = base * altura;
- perimetro = 2 * ( base + altura );
- cout << endl;
- cout << "Area = " << base << " * " << altura << " = " << area << endl;
- cout << "Perimetro = 2 * (" << base << " + " << altura << ") = " << perimetro << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement