From 222f3268e6a3aa17e6ca6fc1b24095b575295099 Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Sat, 20 Jan 2024 12:11:17 -0800 Subject: Homework one final --- Hello World/Hello World.sln | 10 ++ Hello World/homework1/homework1.cpp | 74 +++++++++++++ Hello World/homework1/homework1.vcxproj | 135 ++++++++++++++++++++++++ Hello World/homework1/homework1.vcxproj.filters | 22 ++++ 4 files changed, 241 insertions(+) create mode 100644 Hello World/homework1/homework1.cpp create mode 100644 Hello World/homework1/homework1.vcxproj create mode 100644 Hello World/homework1/homework1.vcxproj.filters diff --git a/Hello World/Hello World.sln b/Hello World/Hello World.sln index c88defd..9bc482a 100644 --- a/Hello World/Hello World.sln +++ b/Hello World/Hello World.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.7.34031.279 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hello World", "Hello World\Hello World.vcxproj", "{3AF90EB9-4E0A-4A02-A83B-F4531C6041D1}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "homework1", "homework1\homework1.vcxproj", "{E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -21,6 +23,14 @@ Global {3AF90EB9-4E0A-4A02-A83B-F4531C6041D1}.Release|x64.Build.0 = Release|x64 {3AF90EB9-4E0A-4A02-A83B-F4531C6041D1}.Release|x86.ActiveCfg = Release|Win32 {3AF90EB9-4E0A-4A02-A83B-F4531C6041D1}.Release|x86.Build.0 = Release|Win32 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Debug|x64.ActiveCfg = Debug|x64 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Debug|x64.Build.0 = Debug|x64 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Debug|x86.ActiveCfg = Debug|Win32 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Debug|x86.Build.0 = Debug|Win32 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Release|x64.ActiveCfg = Release|x64 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Release|x64.Build.0 = Release|x64 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Release|x86.ActiveCfg = Release|Win32 + {E243F3BE-61BC-4712-B08F-6EE1B09BF4B0}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Hello World/homework1/homework1.cpp b/Hello World/homework1/homework1.cpp new file mode 100644 index 0000000..a90c622 --- /dev/null +++ b/Hello World/homework1/homework1.cpp @@ -0,0 +1,74 @@ +// Name: Connor McDowell +// Date: 1/20/24 +// Class: CST116 +// Assignment: homework 1 + +#include + +using std::cout; +using std::cin; + +int main() +{ + int i = 12; + int j = 5; + int q = 14; + const int k = 1024; + int first = 0; + int second = 0; + int third = 0; + int sum = 0; + int product = 0; + int diff_one = 0; + int diff_two = 0; + int end = 0; + + + cout << "Please input your first number" << std::endl; + std::cin >> first; + + cout << "Please input your second number" << std::endl; + std::cin >> second; + + cout << "Please input your last number" << std::endl; + std::cin >> third; + + sum = first + second + third; + product = first * second * third; + + diff_one = sum - k; + diff_two = product - k; + + cout << "The sum of " << first << " and " << second << " and " << third << " is " << sum << "\n"; + cout << "The product of " << first << " and " << second << " and " << third << " is " << product << "\n"; + cout << "The difference between the sum total, " << sum << " and " << k << " is " << diff_one << "\n"; + cout << "The difference between the product, " << product << " and " << k << " is " << diff_two << "\n"; + + enum color_list { red, blue, green }; + + union MyUnion; + { + int intValue = 2; + double floatValue = 2.3; + char charValue = 2; + }; + + struct myStruct; + { + union MyUnion; + enum color_list; + }; + + typedef struct myStruct my_struct; + /* cout << "enter a number and hit enter to end"; + std::cin >> end; + /* std::cout << "Hello World"<< std::endl; + cout << "Enter a whole number: "; + + std::cin >> i; + + cout << "Your number was: " << i << std::endl; + + */ + return 0; +} \ No newline at end of file diff --git a/Hello World/homework1/homework1.vcxproj b/Hello World/homework1/homework1.vcxproj new file mode 100644 index 0000000..b3988c1 --- /dev/null +++ b/Hello World/homework1/homework1.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {e243f3be-61bc-4712-b08f-6ee1b09bf4b0} + homework1 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + 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/Hello World/homework1/homework1.vcxproj.filters b/Hello World/homework1/homework1.vcxproj.filters new file mode 100644 index 0000000..cfd775b --- /dev/null +++ b/Hello World/homework1/homework1.vcxproj.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 -- cgit v1.2.3