
-----------------------------------
Kingnoz
Tue Sep 02, 2003 1:07 pm

Simple Temperature Program
-----------------------------------
this is a simple temperature program i did using VC++ under win32 console application...it is simple but incorporates many things like user-defined functions, cin, cout, declaring integers.

the code is commented on to help ppl understand


// temperature.cpp - converts Celsius to Fahrenheit
#include 
using namespace std;

int Celsius;		//declares Celsius
int Fahrenheit;		//declares Fahrenheit

void temp(int);			// function prototype for temp()
int main()
{
	cout > Celsius;		// asks the user for the integer Celsius
	temp(Celsius);		//calls the temp function
	return 0;
}

void temp(int Celsius)	//the void is used to say that temp has no return value
{
	Fahrenheit = Celsius * 1.8 + 32.0;	//formula to change Celsius to Fahrenheit
	cout 