i have been trying to make a farenheit to celcius converter for about to days ( ya sorry its a big task for me i have only been coding for a day)
and i can get the loop and evrything to work but for some reason i cannot get the far temp to conv. to celcius . Say i was to enter 100 degrees far. i would get a 68 degrees cel. its like it is not reading the 5/9 before the far-32 any help would be appr. and here is my code
[code]
// Farenhiet to Celcius converter
#include <iostream>
using namespace std;
int main()
{
int a;
int b = 1;
do {
float far;
cout<<"Please enter youre farenheit amount to be converted to Celcius: ";
cin>>far;
cin.ignore();
float cel;
cel = (5/9)*(far-32);
cout<< far <<" degrees farneheit is: " << cel << " In Celcius\n";
cout<<"do you want to repeat?( 1 is no any other number is yes) ";
cin>>a;
cin.ignore();
}while ( a != b );
cin.get();
}