summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanturcas <[email protected]>2022-10-23 15:50:53 -0700
committerNathanturcas <[email protected]>2022-10-23 15:50:53 -0700
commit989eafb2fa1a1e7268fe565c8f4367b744429070 (patch)
treef1f58bc53e8ac39d95cdf883e72790ce983a46d6
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-lab1-nathanturcas-989eafb2fa1a1e7268fe565c8f4367b744429070.tar.xz
cst116-lab1-nathanturcas-989eafb2fa1a1e7268fe565c8f4367b744429070.zip
commit 1
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp17
-rw-r--r--BlankConsoleLab/BlankConsoleLab.vcxproj8
2 files changed, 20 insertions, 5 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;
+
}
diff --git a/BlankConsoleLab/BlankConsoleLab.vcxproj b/BlankConsoleLab/BlankConsoleLab.vcxproj
index db2e734..d2e3ee2 100644
--- a/BlankConsoleLab/BlankConsoleLab.vcxproj
+++ b/BlankConsoleLab/BlankConsoleLab.vcxproj
@@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>