In Class Exercise 1

Familiarize with MS Visual Studio

Instructions

Work on the following tasks.

  1. Create an MS Visual Studio Project named as temperatureConversion on Desktop.
  2. Write a new C++ program that converts a temperature in Fahrenheit to Celsius. The formula for conversion is C = 5/9*(F-32). Use online converter to check if your program converts correctly. Google Temperature Converter.
  3. After your program works correctly, you need to remove your program from the project and create another new program that converts temperature in Celsius to Fahrenheit, opposite of the above conversion. The formula for conversion can be derived from the previous one.
  4. Close your project completely. And then open it again by clicking on the solution file in the project folder. Add some prompts for your program so the user can input a temperature from keyboard. Below is a skeleton code for input and output from the program.

#include <iostream>
using namespace std;

int main()
{
  double tempC, tempF;
  cout << "Enter a temperature in Celsius: " << endl;
  cin >> tempC;
  //Conversion here
  cout << "A temperature of " << tempC << " in Celsius is equivalent to " << tempF << " in Fahrenheit. " << endl;   

  return 0;
}