blob: a85abc9163879c3b84551645c37129afb6f5b2ce (
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
|
// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
// Name: Taylor Rogers
// Assignment: Lab 2
//
// Pseudo Code:
// 1. Print "Please enter F for Fahrenheit, or C for Celsius"
// 1. Declare constant [Fmax] = 121
// 2. Declare constant [Fmin] = -80
// 3. Declare constant [Cmax] = 49.5
// 4. Declare constant [Cmin] = -62
// 2. Input [Tunit]
// 3. If [Tunit] = F is selected:
// 1. Print "Enter temperature value between -80 and 121 degrees Fahreneit"
// 2. Input [TvalF]
// 4. If [Tunit] = C is selected:
// 1. Print "Enter temperature value between -52 and 49.5 degrees Celsius"
// 2. Input [TvalC]
// 6. Print "Enter a wind speed, in miles per hour, between 0 and 231"
// 1. Declare constant [Wmax] = 231
// 2. Declare constant [Wmin] = 0
// 3. Input [Wspeed]
// 7. F input function:
// 1. Declare [FtoCval] = ( [TvalF] - 32 ) * ( 5 / 9 )
// 2. [TvalC] = [FtoCval]
// 8. C input function:
// 1. Declare [CtoFval] = (9 / 5 ) * [TvalC] + 32
// 2. [TvalF] = [CtoFval]
// 9. Windchill function:
// 1. [Wchill] = 35.74 + .6215 * [TvalF] - 35.75 * ( [Wspeed] ^ 0.16 ) + 0.4275 * [TvalF] * ( [Wspeed] ^ 0.16 )
// 10. Print headers "Temperature in F" , "Temperature in C", "Windpseed", "Windchill"
// 11. Print [TvalF] , [TvalC] , [Wspeed] , [Wchill]
//
//
//
//
//
//
//
#include <iostream>;
using std::cout;
using std::cin;
using std::endl;
char Tunit = 0;
int TvalF = 0;
int TvalC = 0;
const int Fmax = 121;
const int Fmin = -80;
const int Cmax = 49.5;
const int Cmin = -62;
int main()
{
cout << "Please enter F for Fahrenheit or C for Celsius: ";
cin >> Tunit;
}
|