diff --git a/Lab2_1/Lab2_1/Lab2_1.cpp b/Lab2_1/Lab2_1/Lab2_1.cpp new file mode 100644 index 0000000..af4664f --- /dev/null +++ b/Lab2_1/Lab2_1/Lab2_1.cpp @@ -0,0 +1,44 @@ +// ConsoleApplication11.cpp : Defines the entry point for the console application. +// +/******************************************************** +* Lab2_1 * +* Author: Sam Coon * +* Date: 1/23/15 * +* Include "stdafx.h", , "stdlib.h", "time.h" * +* using namespace std; * +* int main() * +* Use srand(time(0)) * +* Set up variables * +* Make a while loop to run the count 100 times * +* Print out the results * +********************************************************/ + +#include "stdafx.h" +#include +#include "stdlib.h" +#include "time.h" +using namespace std; +int main() +{ + srand(time(0)); + int coinFlip = rand() % 2; + int count = 0; + int heads = 0; + int tails = 0; + + while (count != 100){ + int coinFlip = rand() % 2; + if (coinFlip == 0){ + heads = heads++; + } + else if (coinFlip == 1){ + tails = tails++; + } + count++; + } + + cout << "The coin flipped 100 times and landed on heads " << heads << " times and tails " << tails << " times." << endl; + + getchar(); + return 0; +} diff --git a/Lab2_1/Lab2_1/Lab2_1.sdf b/Lab2_1/Lab2_1/Lab2_1.sdf new file mode 100644 index 0000000..c23d15a Binary files /dev/null and b/Lab2_1/Lab2_1/Lab2_1.sdf differ diff --git a/Lab2_1/Lab2_1/Lab2_1.sln b/Lab2_1/Lab2_1/Lab2_1.sln new file mode 100644 index 0000000..c4ddaba --- /dev/null +++ b/Lab2_1/Lab2_1/Lab2_1.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab2_1", "Lab2_1.vcxproj", "{14B7B72A-59F3-4465-B054-24B76FC1B55D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {14B7B72A-59F3-4465-B054-24B76FC1B55D}.Debug|Win32.ActiveCfg = Debug|Win32 + {14B7B72A-59F3-4465-B054-24B76FC1B55D}.Debug|Win32.Build.0 = Debug|Win32 + {14B7B72A-59F3-4465-B054-24B76FC1B55D}.Release|Win32.ActiveCfg = Release|Win32 + {14B7B72A-59F3-4465-B054-24B76FC1B55D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Lab2_1/Lab2_1/Lab2_1.v12.suo b/Lab2_1/Lab2_1/Lab2_1.v12.suo new file mode 100644 index 0000000..888eeb3 Binary files /dev/null and b/Lab2_1/Lab2_1/Lab2_1.v12.suo differ diff --git a/Lab2_1/Lab2_1/Lab2_1.vcxproj b/Lab2_1/Lab2_1/Lab2_1.vcxproj new file mode 100644 index 0000000..b61b815 --- /dev/null +++ b/Lab2_1/Lab2_1/Lab2_1.vcxproj @@ -0,0 +1,95 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {14B7B72A-59F3-4465-B054-24B76FC1B55D} + Win32Proj + Lab2_1 + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Lab2_1/Lab2_1/Lab2_1.vcxproj.filters b/Lab2_1/Lab2_1/Lab2_1.vcxproj.filters new file mode 100644 index 0000000..0439c00 --- /dev/null +++ b/Lab2_1/Lab2_1/Lab2_1.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;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 + + + + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Lab2_1/Lab2_1/ReadMe.txt b/Lab2_1/Lab2_1/ReadMe.txt new file mode 100644 index 0000000..20eb6af --- /dev/null +++ b/Lab2_1/Lab2_1/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + CONSOLE APPLICATION : Lab2_1 Project Overview +======================================================================== + +AppWizard has created this Lab2_1 application for you. + +This file contains a summary of what you will find in each of the files that +make up your Lab2_1 application. + + +Lab2_1.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +Lab2_1.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +Lab2_1.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Lab2_1.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Lab2_1/Lab2_1/ipch/lab2_1-6d261e57/lab2_1-f70d849d.ipch b/Lab2_1/Lab2_1/ipch/lab2_1-6d261e57/lab2_1-f70d849d.ipch new file mode 100644 index 0000000..0b3185d Binary files /dev/null and b/Lab2_1/Lab2_1/ipch/lab2_1-6d261e57/lab2_1-f70d849d.ipch differ diff --git a/Lab2_1/Lab2_1/stdafx.cpp b/Lab2_1/Lab2_1/stdafx.cpp new file mode 100644 index 0000000..29ffd9e --- /dev/null +++ b/Lab2_1/Lab2_1/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Lab2_1.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Lab2_1/Lab2_1/stdafx.h b/Lab2_1/Lab2_1/stdafx.h new file mode 100644 index 0000000..b005a83 --- /dev/null +++ b/Lab2_1/Lab2_1/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: reference additional headers your program requires here diff --git a/Lab2_1/Lab2_1/targetver.h b/Lab2_1/Lab2_1/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/Lab2_1/Lab2_1/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/Lab2_2/Lab2_2/Lab2_2.cpp b/Lab2_2/Lab2_2/Lab2_2.cpp new file mode 100644 index 0000000..0484cb7 --- /dev/null +++ b/Lab2_2/Lab2_2/Lab2_2.cpp @@ -0,0 +1,38 @@ +// ConsoleApplication13.cpp : Defines the entry point for the console application. +// + +#include "stdafx.h" +#include +#include "stdlib.h" +#include "time.h" +using namespace std; +int main() +{ + srand(time(0)); + int tries = 0; + int number = rand() % 100 + 1; + int guess = 0; + + cout << "\tWelcome to 'Guess My Number'!"; + cout << "\nI'm thinking of a number between 1 and 100."; + cout << "Try to guess it in as few attempts as possible.\n"; + + + while (guess != number){ + cout << "Take a guess: "; + cin >> guess; + if (guess > number){ + cout << "Lower..." << endl; + } + else if (guess < number){ + cout << "Higher..." << endl; + } + tries++; + } + + cout << "\nYou guessed it! The number was " << number << " and it only took you " << tries << " tries!" << endl; + + getchar(); + getchar(); + return 0; +} diff --git a/Lab2_2/Lab2_2/Lab2_2.sdf b/Lab2_2/Lab2_2/Lab2_2.sdf new file mode 100644 index 0000000..d13d866 Binary files /dev/null and b/Lab2_2/Lab2_2/Lab2_2.sdf differ diff --git a/Lab2_2/Lab2_2/Lab2_2.sln b/Lab2_2/Lab2_2/Lab2_2.sln new file mode 100644 index 0000000..3c38018 --- /dev/null +++ b/Lab2_2/Lab2_2/Lab2_2.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab2_2", "Lab2_2.vcxproj", "{6692FF5C-1C87-4B85-8D55-C9C1C46B7574}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6692FF5C-1C87-4B85-8D55-C9C1C46B7574}.Debug|Win32.ActiveCfg = Debug|Win32 + {6692FF5C-1C87-4B85-8D55-C9C1C46B7574}.Debug|Win32.Build.0 = Debug|Win32 + {6692FF5C-1C87-4B85-8D55-C9C1C46B7574}.Release|Win32.ActiveCfg = Release|Win32 + {6692FF5C-1C87-4B85-8D55-C9C1C46B7574}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Lab2_2/Lab2_2/Lab2_2.v12.suo b/Lab2_2/Lab2_2/Lab2_2.v12.suo new file mode 100644 index 0000000..9ed2917 Binary files /dev/null and b/Lab2_2/Lab2_2/Lab2_2.v12.suo differ diff --git a/Lab2_2/Lab2_2/Lab2_2.vcxproj b/Lab2_2/Lab2_2/Lab2_2.vcxproj new file mode 100644 index 0000000..e2588a0 --- /dev/null +++ b/Lab2_2/Lab2_2/Lab2_2.vcxproj @@ -0,0 +1,95 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {6692FF5C-1C87-4B85-8D55-C9C1C46B7574} + Win32Proj + Lab2_2 + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Lab2_2/Lab2_2/Lab2_2.vcxproj.filters b/Lab2_2/Lab2_2/Lab2_2.vcxproj.filters new file mode 100644 index 0000000..bf4f4cc --- /dev/null +++ b/Lab2_2/Lab2_2/Lab2_2.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;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 + + + + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Lab2_2/Lab2_2/ReadMe.txt b/Lab2_2/Lab2_2/ReadMe.txt new file mode 100644 index 0000000..050b236 --- /dev/null +++ b/Lab2_2/Lab2_2/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + CONSOLE APPLICATION : Lab2_2 Project Overview +======================================================================== + +AppWizard has created this Lab2_2 application for you. + +This file contains a summary of what you will find in each of the files that +make up your Lab2_2 application. + + +Lab2_2.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +Lab2_2.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +Lab2_2.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Lab2_2.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Lab2_2/Lab2_2/ipch/lab2_2-55e62b74/lab2_2-f71f9d1e.ipch b/Lab2_2/Lab2_2/ipch/lab2_2-55e62b74/lab2_2-f71f9d1e.ipch new file mode 100644 index 0000000..7d05d4e Binary files /dev/null and b/Lab2_2/Lab2_2/ipch/lab2_2-55e62b74/lab2_2-f71f9d1e.ipch differ diff --git a/Lab2_2/Lab2_2/ipch/lab2_2-edd7b539/lab2_2-f71f9d1e.ipch b/Lab2_2/Lab2_2/ipch/lab2_2-edd7b539/lab2_2-f71f9d1e.ipch new file mode 100644 index 0000000..afd82fa Binary files /dev/null and b/Lab2_2/Lab2_2/ipch/lab2_2-edd7b539/lab2_2-f71f9d1e.ipch differ diff --git a/Lab2_2/Lab2_2/stdafx.cpp b/Lab2_2/Lab2_2/stdafx.cpp new file mode 100644 index 0000000..cbe9971 --- /dev/null +++ b/Lab2_2/Lab2_2/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Lab2_2.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Lab2_2/Lab2_2/stdafx.h b/Lab2_2/Lab2_2/stdafx.h new file mode 100644 index 0000000..b005a83 --- /dev/null +++ b/Lab2_2/Lab2_2/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: reference additional headers your program requires here diff --git a/Lab2_2/Lab2_2/targetver.h b/Lab2_2/Lab2_2/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/Lab2_2/Lab2_2/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.exe b/Lab2_3/Lab2_3/Debug/Lab2_3.exe new file mode 100644 index 0000000..8554e7f Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.exe differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.ilk b/Lab2_3/Lab2_3/Debug/Lab2_3.ilk new file mode 100644 index 0000000..08317f0 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.ilk differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.log b/Lab2_3/Lab2_3/Debug/Lab2_3.log new file mode 100644 index 0000000..3222921 --- /dev/null +++ b/Lab2_3/Lab2_3/Debug/Lab2_3.log @@ -0,0 +1,15 @@ +Build started 1/30/2015 1:17:10 AM. +Project "C:\Users\IEUser\Documents\Visual Studio 2013\Projects\Lab2_3\Lab2_3\Lab2_3.vcxproj" on node 2 (Build target(s)). +ClCompile: + C:\Program Files\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /sdl /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _LIB /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"stdafx.h" /Fp"Debug\Lab2_3.pch" /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt Lab2_3.cpp + Lab2_3.cpp +c:\users\ieuser\documents\visual studio 2013\projects\lab2_3\lab2_3\lab2_3.cpp(45): warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data +Link: + C:\Program Files\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\IEUser\Documents\Visual Studio 2013\Projects\Lab2_3\Lab2_3\Debug\Lab2_3.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\IEUser\Documents\Visual Studio 2013\Projects\Lab2_3\Lab2_3\Debug\Lab2_3.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\IEUser\Documents\Visual Studio 2013\Projects\Lab2_3\Lab2_3\Debug\Lab2_3.lib" /MACHINE:X86 Debug\Lab2_3.obj + Debug\stdafx.obj + Lab2_3.vcxproj -> C:\Users\IEUser\Documents\Visual Studio 2013\Projects\Lab2_3\Lab2_3\Debug\Lab2_3.exe +Done Building Project "C:\Users\IEUser\Documents\Visual Studio 2013\Projects\Lab2_3\Lab2_3\Lab2_3.vcxproj" (Build target(s)). + +Build succeeded. + +Time Elapsed 00:00:01.22 diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.obj b/Lab2_3/Lab2_3/Debug/Lab2_3.obj new file mode 100644 index 0000000..d0aab17 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.obj differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.pch b/Lab2_3/Lab2_3/Debug/Lab2_3.pch new file mode 100644 index 0000000..060f0e1 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.pch differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.pdb b/Lab2_3/Lab2_3/Debug/Lab2_3.pdb new file mode 100644 index 0000000..f7c5255 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.pdb differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/CL.read.1.tlog b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/CL.read.1.tlog new file mode 100644 index 0000000..bd8681e Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/CL.read.1.tlog differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/CL.write.1.tlog b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/CL.write.1.tlog new file mode 100644 index 0000000..c82c988 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/CL.write.1.tlog differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/Lab2_3.lastbuildstate b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/Lab2_3.lastbuildstate new file mode 100644 index 0000000..34a51f0 --- /dev/null +++ b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/Lab2_3.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit +Debug|Win32|C:\Users\IEUser\Documents\Visual Studio 2013\Projects\Lab2_3\Lab2_3\| diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/cl.command.1.tlog b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/cl.command.1.tlog new file mode 100644 index 0000000..a31be0b Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/cl.command.1.tlog differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.command.1.tlog b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.command.1.tlog new file mode 100644 index 0000000..a2fa6fd Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.command.1.tlog differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.read.1.tlog b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.read.1.tlog new file mode 100644 index 0000000..ed9c924 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.read.1.tlog differ diff --git a/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.write.1.tlog b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.write.1.tlog new file mode 100644 index 0000000..5a1ae17 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/Lab2_3.tlog/link.write.1.tlog differ diff --git a/Lab2_3/Lab2_3/Debug/stdafx.obj b/Lab2_3/Lab2_3/Debug/stdafx.obj new file mode 100644 index 0000000..668f607 Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/stdafx.obj differ diff --git a/Lab2_3/Lab2_3/Debug/vc120.idb b/Lab2_3/Lab2_3/Debug/vc120.idb new file mode 100644 index 0000000..3941b3a Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/vc120.idb differ diff --git a/Lab2_3/Lab2_3/Debug/vc120.pdb b/Lab2_3/Lab2_3/Debug/vc120.pdb new file mode 100644 index 0000000..425fd4d Binary files /dev/null and b/Lab2_3/Lab2_3/Debug/vc120.pdb differ diff --git a/Lab2_3/Lab2_3/Lab2_3.cpp b/Lab2_3/Lab2_3/Lab2_3.cpp new file mode 100644 index 0000000..50a525f --- /dev/null +++ b/Lab2_3/Lab2_3/Lab2_3.cpp @@ -0,0 +1,64 @@ +// Lab2_3.cpp : Defines the entry point for the console application. +// +/************************************ +* Lab2_3.cpp * +* Author: Sam Coon * +* Help: Zach Golik, Brandon * +* Date: 1/27/15 * +************************************/ +#include "stdafx.h" +#include +#include "stdlib.h" +#include "time.h" +using namespace std; +int main() +{ + int dice = 0; + int type = 0; + int mod = 0; + int totalRoll = 0; + + cout << "\tWelcome to Die-Roller!" << endl; + cout << "Instructions:" << endl; + cout << "To roll, type the number of dice, then the number\n" << endl; + cout << "of sides then any modifiers, all seperated by spaces." << endl; + cout << "like this: 3 6 -1" << endl; + cout << "that would mean:" << endl; + cout << "Roll 3 6-sided dice, and subtract 1 from each die" << endl; + cout << "To exit, enter: 1 1 1" << endl; + cout << "ENJOY!" << endl; + + int roll = 0; + int exit = 0; + char dieRoller[3]; + + for (int i = 0; i < 3; i++){ + dieRoller[i] = 0; + } + cout << "Roll the dice: "; + cin >> dice; + cin >> type; + cin >> mod; + + cout << dice; + + srand(time(NULL)); + while (dice != 1 || type != 1 || mod != 1){ + totalRoll = 0; + for (int i = 0; i < dice; i++){ + totalRoll += ((rand() % type + 1) + mod); + } + cout << "The roll total was " << totalRoll << "." << endl; + cout << "Roll the dice: "; + cin >> dice; + cin >> type; + cin >> mod; + + } + cout << "Thank you, Have a nice day."; + + getchar(); + getchar(); + return 0; +} + diff --git a/Lab2_3/Lab2_3/Lab2_3.sdf b/Lab2_3/Lab2_3/Lab2_3.sdf new file mode 100644 index 0000000..892c625 Binary files /dev/null and b/Lab2_3/Lab2_3/Lab2_3.sdf differ diff --git a/Lab2_3/Lab2_3/Lab2_3.sln b/Lab2_3/Lab2_3/Lab2_3.sln new file mode 100644 index 0000000..e2dd18b --- /dev/null +++ b/Lab2_3/Lab2_3/Lab2_3.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab2_3", "Lab2_3.vcxproj", "{78305A19-79F8-421D-813D-1DA511681B62}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {78305A19-79F8-421D-813D-1DA511681B62}.Debug|Win32.ActiveCfg = Debug|Win32 + {78305A19-79F8-421D-813D-1DA511681B62}.Debug|Win32.Build.0 = Debug|Win32 + {78305A19-79F8-421D-813D-1DA511681B62}.Release|Win32.ActiveCfg = Release|Win32 + {78305A19-79F8-421D-813D-1DA511681B62}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Lab2_3/Lab2_3/Lab2_3.v12.suo b/Lab2_3/Lab2_3/Lab2_3.v12.suo new file mode 100644 index 0000000..d9b139d Binary files /dev/null and b/Lab2_3/Lab2_3/Lab2_3.v12.suo differ diff --git a/Lab2_3/Lab2_3/Lab2_3.vcxproj b/Lab2_3/Lab2_3/Lab2_3.vcxproj new file mode 100644 index 0000000..be875c7 --- /dev/null +++ b/Lab2_3/Lab2_3/Lab2_3.vcxproj @@ -0,0 +1,95 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {78305A19-79F8-421D-813D-1DA511681B62} + Win32Proj + Lab2_3 + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Lab2_3/Lab2_3/Lab2_3.vcxproj.filters b/Lab2_3/Lab2_3/Lab2_3.vcxproj.filters new file mode 100644 index 0000000..dd8e130 --- /dev/null +++ b/Lab2_3/Lab2_3/Lab2_3.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;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 + + + + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Lab2_3/Lab2_3/ReadMe.txt b/Lab2_3/Lab2_3/ReadMe.txt new file mode 100644 index 0000000..f595e91 --- /dev/null +++ b/Lab2_3/Lab2_3/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + CONSOLE APPLICATION : Lab2_3 Project Overview +======================================================================== + +AppWizard has created this Lab2_3 application for you. + +This file contains a summary of what you will find in each of the files that +make up your Lab2_3 application. + + +Lab2_3.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +Lab2_3.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +Lab2_3.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named Lab2_3.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Lab2_3/Lab2_3/ipch/lab2_3-fef4899d/lab2_3-f731b59f.ipch b/Lab2_3/Lab2_3/ipch/lab2_3-fef4899d/lab2_3-f731b59f.ipch new file mode 100644 index 0000000..97e0509 Binary files /dev/null and b/Lab2_3/Lab2_3/ipch/lab2_3-fef4899d/lab2_3-f731b59f.ipch differ diff --git a/Lab2_3/Lab2_3/stdafx.cpp b/Lab2_3/Lab2_3/stdafx.cpp new file mode 100644 index 0000000..37fdd52 --- /dev/null +++ b/Lab2_3/Lab2_3/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Lab2_3.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Lab2_3/Lab2_3/stdafx.h b/Lab2_3/Lab2_3/stdafx.h new file mode 100644 index 0000000..b005a83 --- /dev/null +++ b/Lab2_3/Lab2_3/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: reference additional headers your program requires here diff --git a/Lab2_3/Lab2_3/targetver.h b/Lab2_3/Lab2_3/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/Lab2_3/Lab2_3/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include