blob: 8183f7b1639173557de645244207c5c8f60c7a43 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
using namespace std;
using std::cout;
using std::cin;
using std::endl;
float Cel;
float Fah;
char Sel;
float WindChill;
float WindSpeed;
//start Menu
void Menu()
{
cout<< "Welcome to the Menu!!" << endl;
}
void printFunctionCF()
{
cout << "For " << Fah << " Degrees f and " << WindSpeed << " mph winds the windchill is: " << WindChill << endl;
}
void printFunctionFC()
{
cout << "The";
}
//Celcius to Fahrenheit
int CeltoFar()
{
cout << "Type your temprature in Celcius: ";
cin >> Cel;
cout << endl;
cout << "You entered " << Cel << endl;
Fah = 9 / 5 * Cel + 32; ;
cout << "which is " << Fah << " degrees fahrenheit" << endl;
cout << "Type the windspeed in mph " << endl;
cin >> WindSpeed;
WindChill = 35.74 + .6215 * Fah * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed,.16);
return WindChill;
return WindSpeed;
return Fah;
}
int FartoCel()
{
cout << "Type your temprature in Fahrenheit: ";
cin >> Fah;
cout << endl;
cout << "You entered " << Fah << endl;
Cel = (Fah - 32) *5/9;
cout << "which is " << Cel << " degrees Celcius" << endl;
cout << "Type the windspeed in mph " << endl;
cin >> WindSpeed;
WindChill = 35.74 + .6215 * Fah * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed, .16);
return WindChill;
return WindSpeed;
return Cel;
}
int readI()
{
int choose = 1;
cout << "Type your selection here: ";
cin >> choose;
return choose;
}
//Driver Program
int main()
{
cout << "Welcome to the Menu!!" << endl;
cout << "Cel or Fah" << endl << "Please type C or F: ";
cin >> Sel;
if (Sel == 'C' || Sel == 'c')
{
CeltoFar();
}
else if (Sel == 'F' || Sel == 'f')
{
FartoCel();
}
else
{
cout << "Please try again." << endl << "Remember you can only type C or F: ";
cin >> Sel;
}
printFunctionCF();
}
|