1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifdef __MSDOS__
    #include <iostream.h>
    #include <stdlib.h>
#else
    #include <iostream>
    #include <cstdlib>
    using namespace std;
#endif

int main (void)
{
    float area, arista, lado;
    cout << "Ingresa el valor de arista: ";
    cin >> arista;
    cin.get();
    cout << "Ingresa el valor de lado: ";
    cin >> lado;
    cin.get();
    area=lado*lado+lado*arista*2;
    cout << "Valor de area: " << area << endl;
    cout << endl;
    system ("pause");
    return EXIT_SUCCESS;
}