it's givin error about cmath.h...but why?!?
Code:// troll1.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "iostream.h" #include "cmath.h" using namespace std; void main() { int cateto1, cateto2; cout << "Calcular a hipotenusa de um um triângulo sendo dados os seus catetos:\nCateto 1: "; cin >> cateto1; cout << "Cateto 2: "; cin >> cateto2; count << "A hipotenusa é" << hipotenusa(cateto1, cateto2); } int hipotenusa(int cateto1, int cateto2) { cateto1 = cateto1^2; cateto2 = cateto2^2; return sqtr(cateto1 + cateto2); }




Reply With Quote