Share
Explore BrainMass

C++ Program to Convert Temperatures

For a given temperature convert it to Degree Celsius or Fahrenheit. User enters the temperature and Type.

Solution Preview

// Temperature Conversion Program
#include <iostream>
using namespace std;

int main()
{
char temp_type;
double temp, fahren, celsius;

cout << "Enter the temperature to be converted: ";
cin >> temp;

cout << "Enter F if temperature is in Fahrenheit";
...

Solution Summary

For a given temperature convert it to Degree Celsius or Fahrenheit.
User enters the temperature and Type.

$2.19