///
/// Program to convert temperature from Celsius degree
/// units into Fahrenheit degree units:
/// Fahrenheit = Celsius * (212 - 32)/100 + 32
///
#include <iostream.h>
#include <conio.h>
int main(int nNumberofArgs, char* pszArgs[])
{
clrscr();
/// enter the temperature in Celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius ;
/// calculate conversion factor for Celsius:";
/// to Fahrenheit
int factor;
factor = 212 - 32;
/// user conversion factor to convert Celsius
/// into Fahrenheit values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
/// output the results
cout << "Fahrenheit value is:";
cout << fahrenheit;
getch();
return 0;
}
works for me in borland, i have done the fahrenheit program but i used varribles in mine like float, if you know what i mean