Hey whats up all, I've been learning c++ for a few days and at college today we were given an assignment to create a program which takes an inputted value (centigrade) and outputs a farenheit value. The formula for which is: farenheit = 9/5 x centigrade + 32. My code is as follows:
well, it doesn't work, I was wondering if anyone could offer any insight or help? Forgive my ignorance as I've only been working with c++ for a few days now. Any help would be greated appreciated, peace.Code:#include<iostream> int main() { int farenheit; int centigrade; farenheit = (9/5)*(centigrade+32); std::cout << "Enter degrees centigrade :\n"; std::cin >> centigrade; std::cout << "Farenheit is equal to: " << farenheit << std::endl; return 0; }