summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorjacobdw22 <[email protected]>2022-11-02 01:52:14 -0700
committerjacobdw22 <[email protected]>2022-11-02 01:52:14 -0700
commitdd2247923d5f0326227df4ff43f9b31e71f6a1ed (patch)
treeacd4a7546c63ca7831d230f1bfbd0175ee8c8fc9 /BlankConsoleLab/BlankConsoleLab.cpp
parentSimple changes (diff)
downloadarchived-cst116-lab2-jacobdw22-dd2247923d5f0326227df4ff43f9b31e71f6a1ed.tar.xz
archived-cst116-lab2-jacobdw22-dd2247923d5f0326227df4ff43f9b31e71f6a1ed.zip
Renamed code file to cst116 standard
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
deleted file mode 100644
index f6e2ee4..0000000
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
-//
-
-#include <iostream>
-#include <stdio.h> /* printf */
-#include <math.h> /* pow */
-#include <cmath> /* pow */
-
-
-using namespace std;
-
-
-using std::cout;
-using std::cin;
-using std::endl;
-
-
-const float FMAX = 121;
-const float FMIN = -80;
-const float CMAX = 49.5;
-const float CMIN = -62; //Set values for minimum and maximum temperatures.
-
-
-float CtoF(float Fahrenheit, float Celsius) {
-
- Fahrenheit = (Celsius * 9.0 / 5.0) + 32.0; //Converts Celsius to Fahrenheit
-
- return Fahrenheit; //Returns the newly defined fahrenheit to main
-}
-
-
-
-
-
-int main()
-{
- float Celsius = 0.0; //Defines Celsius for the conversion function
- float Fahrenheit = 0.0; //Defines Fahrenheit for the conversion function
-
- Loop: //Placeholder to loop back to
-
- cout << "Please enter a temperature between -62 and 49.5 degrees Celsius: \n";
- cin >> Celsius; //Reads in Celsius from the user input
-
- if (Celsius <= CMAX && Celsius >= CMIN) {
- cout << Celsius << " Degrees Celsius is approximately " << CtoF(Fahrenheit, Celsius) << " Degrees Fahrenheit\n\n";
- }
- else {
- goto Loop; //Goes back to placeholder to Loop in case of invalid response (past limits)
- }
-
-}
-