float main(){ float x,a,b; printf ("Digite o valor de a e b: \n"); scanf ("%2f %2f", &a, &b); x = hip(a,b); printf("o valor da hipotenusa e: %.2f\n", x); getch(); }
string c_haship_addr::get_hip_as_string(bool with_dots) const{ string_as_hex dbg( string_as_bin(*this) ); string hip(dbg.get()); ostringstream out; for(auto it = hip.begin(); it < hip.end(); it++) { if(with_dots && it != hip.begin() && (it - hip.begin()) % 4 == 0) out << ':'; out << *it; } return out.str(); }