All pastes #371245 Raw Edit

Someone

public text v1 · immutable
#371245 ·published 2007-02-25 05:16 UTC
rendered paste body
//
// Program to convert temperature from Celsius degree
// units to Fahrenheit degree units:
// F - C * (212-32)/100 + 32
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;

int main(int nNumberofArgs, char* pszArgs[])
{
// enter temp in Celsius
int celsius;
cout  << "Enter temp in C:";
cin >> celsius;

// calculate converstion factor to convert C to F
int factor;
factor = 212 - 32;

// use conversion factor to convert C to F values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;

// output the results 
cout << "Fahrenheit value is:";
cout << fahrenheit << endl;

// wait until user is ready before terminating program
system("PAUSE");
return 0;
}