diff options
| author | Nathanturcas <[email protected]> | 2022-10-23 15:50:53 -0700 |
|---|---|---|
| committer | Nathanturcas <[email protected]> | 2022-10-23 15:50:53 -0700 |
| commit | 989eafb2fa1a1e7268fe565c8f4367b744429070 (patch) | |
| tree | f1f58bc53e8ac39d95cdf883e72790ce983a46d6 /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | cst116-lab1-nathanturcas-989eafb2fa1a1e7268fe565c8f4367b744429070.tar.xz cst116-lab1-nathanturcas-989eafb2fa1a1e7268fe565c8f4367b744429070.zip | |
commit 1
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ed5f807..53c8b7f 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -11,6 +11,21 @@ using std::endl; int main() { - cout << "Hello World!\n"; + float width, height,area; + + cout << "Enter width (cm) : "; + cin >> width; + cout << "Enter height (cm) : "; + cin >> height; + + cout << "width: "; + cout << width<< endl; + cout << "height: "; + cout << height << endl; + + area = (width * height / 2) / 10000; + cout << "area (m) : "; + cout << area << endl; + } |