Advertisement
idsystems

Practica 14 - Triangulo

Jan 16th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. // Program: triangulo.cc
  2. // Author:  Yoan Pinzon
  3. // Date:    Agosto 30, 2006
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.    float base, altura, area;
  12.  
  13.    cout << "Area del triangulo" << endl;
  14.    cout << "==================" << endl;
  15.  
  16.    cout << "Entre el valor de la base = "; cin >> base;
  17.    cout << "Entre el valor de la altura = "; cin >> altura;
  18.  
  19.    area = ( base * altura ) / 2;
  20.  
  21.    cout << endl;
  22.    cout << "Area = " << area << endl;
  23.  
  24.    return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement