Created
March 16, 2017 17:11
-
-
Save ninpl/ad96879d900b1a86f92f2b12ca322d8f to your computer and use it in GitHub Desktop.
Hallar el area de un triangulo
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
// Practica para refrescar la sintaxis de C++ | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
// Hallar el area de un triangulo | |
float base,altura,area; | |
cout<<"Ingrese la base del triangulo:"; | |
cin>>base; | |
cout<<"Ingrese la altura:"; | |
cin>>altura; | |
area = (base*altura)/2; | |
cout<<"El area es "<<area<<endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment