blob: f720cdf41004f0329959bf7f56d01c584a876d45 (
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
using namespace std;
using std::cout;
using std::cin;
using std::endl;
//Float Variables declared
float Cel;
float Fah;
float WindChill;
float WindSpeed;
//Char Variable declared
char Sel;
function PrintFunctionCF is Declared
Display the Following
(EX. For 32 Degrees f and 90 mph windchill is 10.288)
end of Function
function PrintFunctionFC is Declared
Display the Following
(EX. For 32 Degrees c and 90 kmh windchill is 10.288)
end of Function
Function CeltoFar is introduced
Display The range is between -62 and 49.5
Display Type your temprature in celcius
Enter Cel (Celcius)
if the Celcius is greater than -62 and 49.5
Display You Entered (celcius)
Calculation is done from celcius to fahrenheit (Fah = 9 / 5 * Cel + 32)
Display which is (fahrenheit) degrees fahrenheit
else
Display Please Try again
Display Type your temprature in Celcius:
Enter Cel
Display Type the windspeed in mph
Enter WindSpeed
if the WindSpeed is greater than 0 and 231
Calculation(WindChill = 35.74 + .6215 * Fah - 35.75
* pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed, .16))
else
Display Please Try again
Display Type your windspeed in mph:
Enter Windspeed
return Windchill
return Windspeed
return Fah
End of function
Function FahtoCel is introduced
Display The range is between -79.6 and 121.1
Display Type your temprature in fahrenheit
Enter Fah (Fahrenheit)
if the fahrenheit is greater than -79.6 and 121.1
Display You Entered (fahrenheit)
Calculation is done from fahrenheit to celcius (Cel = (Fah - 32) * 5 / 9)
Display which is (Celcius) degrees Celcius
else
Display Please Try again
Display Type your temprature in Fahrenheit:
Enter Fah
Display Type the windspeed in kmh
Enter WindSpeed
if the WindSpeed is greater than 0 and 371.758
Calculation(WindChill = 13.12 + .6215 * Cel - 11.37
* pow(WindSpeed, .16) + .3965 * Cel * pow(WindSpeed, .16))
else
Display Please Try again
Display Type your windspeed in kmh:
Enter Windspeed
return Windchill
return Windspeed
return Fah
End of function
menuChoice is introduced
char CH is set to equal to Sel
if the CH is equal to C or c
CeltoFar
printFunctionCF
else if CH is equal to F or f
FahtoCel
printFunctionFC
end of Function
welcomeMessageChoice is declared
Display Welcome to the Menu!!
while Sel is not equal to 'C' & Sel is not equal to 'c'
& Sel is not equal to 'f' & Sel is not equal to 'F'
Display Cel or Fah
Display Please type C or F:
Enter Sel
menuChoice
return Sel;
End of Function
main function is introduced
welcomeMessageChoice
menuChoice
end of function
|