All pastes #191593 Raw Edit

Mine

public text v1 · immutable
·published 2006-10-05 03:23 UTC
rendered paste body
/*/
Program to convert temperature from Celsius degree
units into fahrenheit
fahrenheit = celcius * (212 - 32)/100 + 32
*/
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;

int main(int nNumberofArgs, char* pszArgsp[])
{

	// enter the temperature in Celsius
	int celsius;
	cout << "Enter the temperature in Celcius:";
	cin >> celsius;

	// calculate conversion factor for Celsius
	// to Fahrenheit
	int factor;
	factor = 212 - 32;

	// use conversion factor to convert Celsius
	// into Fahrenheit values
	int fahrenheit;
	fahrenheit = factor * celsius/100 + 32;

	//output the results (followed by a NewLine)
	cout << "Fahrenheit value is:";
	cout << fahrenheit << endl;

	// wait until the user is ready to terminate the program
	// to allow teh user to see the program results
	system("PAUSE");
	return 0;
}