From 48ae333852499b3bdb44e81c6eff32f7ede9c965 Mon Sep 17 00:00:00 2001 From: Jordan HarrisToovy Date: Fri, 15 Oct 2021 12:58:26 -0700 Subject: Base code finished --- CST116 Project 1 Harris-Toovy.sln | 31 +++++ CST116F2021-Proj1.sln | 31 ----- .../CST116 Project 1 Harris-Toovy.cpp | 44 ++++++ .../CST116 Project 1 Harris-Toovy.filters | 22 +++ .../CST116 Project 1 Harris-Toovy.vcxproj | 147 +++++++++++++++++++++ CST116F2021-Proj1/CST116F2021-Proj1.cpp | 20 --- CST116F2021-Proj1/CST116F2021-Proj1.vcxproj | 147 --------------------- .../CST116F2021-Proj1.vcxproj.filters | 22 --- CppProperties.json | 21 +++ 9 files changed, 265 insertions(+), 220 deletions(-) create mode 100644 CST116 Project 1 Harris-Toovy.sln delete mode 100644 CST116F2021-Proj1.sln create mode 100644 CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.cpp create mode 100644 CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.filters create mode 100644 CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.vcxproj delete mode 100644 CST116F2021-Proj1/CST116F2021-Proj1.cpp delete mode 100644 CST116F2021-Proj1/CST116F2021-Proj1.vcxproj delete mode 100644 CST116F2021-Proj1/CST116F2021-Proj1.vcxproj.filters create mode 100644 CppProperties.json diff --git a/CST116 Project 1 Harris-Toovy.sln b/CST116 Project 1 Harris-Toovy.sln new file mode 100644 index 0000000..0983236 --- /dev/null +++ b/CST116 Project 1 Harris-Toovy.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31424.327 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CST116F2021-Proj1", "CST116F2021-Proj1\CST116F2021-Proj1.vcxproj", "{274C68C2-C9CA-473C-98E3-CF3E3325612A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x64.ActiveCfg = Debug|x64 + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x64.Build.0 = Debug|x64 + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x86.ActiveCfg = Debug|Win32 + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x86.Build.0 = Debug|Win32 + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x64.ActiveCfg = Release|x64 + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x64.Build.0 = Release|x64 + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x86.ActiveCfg = Release|Win32 + {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {50446C52-56D9-4C6D-8DED-435AC3CDCBD9} + EndGlobalSection +EndGlobal diff --git a/CST116F2021-Proj1.sln b/CST116F2021-Proj1.sln deleted file mode 100644 index 0983236..0000000 --- a/CST116F2021-Proj1.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31424.327 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CST116F2021-Proj1", "CST116F2021-Proj1\CST116F2021-Proj1.vcxproj", "{274C68C2-C9CA-473C-98E3-CF3E3325612A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x64.ActiveCfg = Debug|x64 - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x64.Build.0 = Debug|x64 - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x86.ActiveCfg = Debug|Win32 - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Debug|x86.Build.0 = Debug|Win32 - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x64.ActiveCfg = Release|x64 - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x64.Build.0 = Release|x64 - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x86.ActiveCfg = Release|Win32 - {274C68C2-C9CA-473C-98E3-CF3E3325612A}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {50446C52-56D9-4C6D-8DED-435AC3CDCBD9} - EndGlobalSection -EndGlobal diff --git a/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.cpp b/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.cpp new file mode 100644 index 0000000..1e461b5 --- /dev/null +++ b/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.cpp @@ -0,0 +1,44 @@ +//Code by Jordan Harris-Toovy for OIT's CST116 course, October 2021 + +/* +* Pseudocode: +* DISPLAY Prompt for radius +* GET user input, put into variable radius +* +* DISPLAY Prompt for height +* GET user input, put into variable height +* +* Calculate volume, put into variable volume +* DISPLAY Prompt for volume +*/ + +#include +#include + +int main() +{ + float radius = 0.0F, height = 0.0F, volume = 0.0F, pi = 3.14159265359F; + + //Get values from user + std::cout << "Cylinder volume calculator MK1\n" << "Enter the radius of the cylinder: "; + std::cin >> radius; + + std::cout << "\nEnter the height of the cylinder: "; + std::cin >> height; + + //Exit if either input is less then zero + if ((radius < 0) || (height < 0)) + { + std::cout << "\nInvald input\n"; + return (1); + } + + //Calculate volume + volume = height * pi * radius * radius; + + //Display the volume + std::cout.setf(std::ios::fixed); + std::cout << "\n\nThe volume of the cylinder is: " << std::setprecision(2) << volume << std::endl; + + return (0); +} diff --git a/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.filters b/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.filters new file mode 100644 index 0000000..96bd064 --- /dev/null +++ b/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.vcxproj b/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.vcxproj new file mode 100644 index 0000000..c292f38 --- /dev/null +++ b/CST116F2021-Proj1/CST116 Project 1 Harris-Toovy.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {274c68c2-c9ca-473c-98e3-cf3e3325612a} + CST116F2021Proj1 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/CST116F2021-Proj1/CST116F2021-Proj1.cpp b/CST116F2021-Proj1/CST116F2021-Proj1.cpp deleted file mode 100644 index 8bcb373..0000000 --- a/CST116F2021-Proj1/CST116F2021-Proj1.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// CST116F2021-Proj1.cpp : This file contains the 'main' function. Program execution begins and ends there. -// - -#include - -int main() -{ - std::cout << "Hello World!\n"; -} - -// Run program: Ctrl + F5 or Debug > Start Without Debugging menu -// Debug program: F5 or Debug > Start Debugging menu - -// Tips for Getting Started: -// 1. Use the Solution Explorer window to add/manage files -// 2. Use the Team Explorer window to connect to source control -// 3. Use the Output window to see build output and other messages -// 4. Use the Error List window to view errors -// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project -// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file diff --git a/CST116F2021-Proj1/CST116F2021-Proj1.vcxproj b/CST116F2021-Proj1/CST116F2021-Proj1.vcxproj deleted file mode 100644 index acf4e53..0000000 --- a/CST116F2021-Proj1/CST116F2021-Proj1.vcxproj +++ /dev/null @@ -1,147 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {274c68c2-c9ca-473c-98e3-cf3e3325612a} - CST116F2021Proj1 - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - false - - - true - - - false - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - - \ No newline at end of file diff --git a/CST116F2021-Proj1/CST116F2021-Proj1.vcxproj.filters b/CST116F2021-Proj1/CST116F2021-Proj1.vcxproj.filters deleted file mode 100644 index 96bd064..0000000 --- a/CST116F2021-Proj1/CST116F2021-Proj1.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/CppProperties.json b/CppProperties.json new file mode 100644 index 0000000..659bf4e --- /dev/null +++ b/CppProperties.json @@ -0,0 +1,21 @@ +{ + "configurations": [ + { + "inheritEnvironments": [ + "msvc_x86" + ], + "name": "x86-Debug", + "includePath": [ + "${env.INCLUDE}", + "${workspaceRoot}\\**" + ], + "defines": [ + "WIN32", + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "intelliSenseMode": "windows-msvc-x86" + } + ] +} \ No newline at end of file -- cgit v1.2.3