Simple Function C++ -
using namespace std; int main() { return 0; } double c2f() { f = value * 9 / 5 + 32; return f; } double k2f() { f = (value - 273.15) * 1.8 + 32.0; return f; } double n2f() { f = value * 60 / 11 + 32; return f; }
im having trouble calling these functions calculate temperature conversion instead of calculation within cases. program not compile after adding these functions. "error: expected ";""
you cannot declare or define functions inside function. move definitions outside of int main(){ ... }
.
Comments
Post a Comment