diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/Øving 2/Øving 2/Øving 2.sln b/Oving 2/Oppg5/Oppg5.sln similarity index 50% rename from Øving 2/Øving 2/Øving 2.sln rename to Oving 2/Oppg5/Oppg5.sln index dc4394d..6f16ae9 100644 --- a/Øving 2/Øving 2/Øving 2.sln +++ b/Oving 2/Oppg5/Oppg5.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.28307.271 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Øving 2", "Øving 2\Øving 2.vcxproj", "{7846FDBB-329B-4890-A7F4-1868D36342FB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oppg5", "Oppg5\Oppg5.vcxproj", "{E31C569E-BC43-4B14-8514-116F432F27DF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,19 +13,19 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Debug|x64.ActiveCfg = Debug|x64 - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Debug|x64.Build.0 = Debug|x64 - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Debug|x86.ActiveCfg = Debug|Win32 - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Debug|x86.Build.0 = Debug|Win32 - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Release|x64.ActiveCfg = Release|x64 - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Release|x64.Build.0 = Release|x64 - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Release|x86.ActiveCfg = Release|Win32 - {7846FDBB-329B-4890-A7F4-1868D36342FB}.Release|x86.Build.0 = Release|Win32 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Debug|x64.ActiveCfg = Debug|x64 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Debug|x64.Build.0 = Debug|x64 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Debug|x86.ActiveCfg = Debug|Win32 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Debug|x86.Build.0 = Debug|Win32 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Release|x64.ActiveCfg = Release|x64 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Release|x64.Build.0 = Release|x64 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Release|x86.ActiveCfg = Release|Win32 + {E31C569E-BC43-4B14-8514-116F432F27DF}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3E25C138-47B4-4BF9-BAAE-D9030FE6432F} + SolutionGuid = {0CD61EBC-FE68-4048-811D-31E82A6BEBA6} EndGlobalSection EndGlobal diff --git a/Øving 2/Øving2_oppg4/Øving2_oppg4/Øving2_oppg4.vcxproj b/Oving 2/Oppg5/Oppg5/Oppg5.vcxproj similarity index 95% rename from Øving 2/Øving2_oppg4/Øving2_oppg4/Øving2_oppg4.vcxproj rename to Oving 2/Oppg5/Oppg5/Oppg5.vcxproj index 64be968..1b17ce9 100644 --- a/Øving 2/Øving2_oppg4/Øving2_oppg4/Øving2_oppg4.vcxproj +++ b/Oving 2/Oppg5/Oppg5/Oppg5.vcxproj @@ -1,4 +1,4 @@ - + @@ -23,8 +23,8 @@ 15.0 - {b0d04901-1e2c-4441-ab9a-1d045eb8506a} - Øving2_oppg4 + {e31c569e-bc43-4b14-8514-116f432f27df} + Oppg5 10.0.17763.0 @@ -99,7 +99,7 @@ Graph_libd.lib;fltkd.lib;wsock32.lib;comctl32.lib;fltkjpegd.lib;fltkimagesd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - /ignore:4099 %(AdditionalOptions) + /ignore:4099 %(AdditionalOptions) @@ -113,7 +113,7 @@ Graph_libd.lib;fltkd.lib;wsock32.lib;comctl32.lib;fltkjpegd.lib;fltkimagesd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - /ignore:4099 %(AdditionalOptions) + /ignore:4099 %(AdditionalOptions) @@ -131,7 +131,7 @@ true true Graph_lib.lib;fltk.lib;wsock32.lib;comctl32.lib;fltkjpeg.lib;fltkimages.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - /ignore:4099 %(AdditionalOptions) + /ignore:4099 %(AdditionalOptions) @@ -149,7 +149,7 @@ true true Graph_lib.lib;fltk.lib;wsock32.lib;comctl32.lib;fltkjpeg.lib;fltkimages.lib;;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - /ignore:4099 %(AdditionalOptions) + /ignore:4099 %(AdditionalOptions) diff --git a/Øving 2/Øving2_oppg4/Øving2_oppg4/Øving2_oppg4.vcxproj.filters b/Oving 2/Oppg5/Oppg5/Oppg5.vcxproj.filters similarity index 100% rename from Øving 2/Øving2_oppg4/Øving2_oppg4/Øving2_oppg4.vcxproj.filters rename to Oving 2/Oppg5/Oppg5/Oppg5.vcxproj.filters diff --git a/Øving 2/Øving2_oppg4/Øving2_oppg4/loan_drawer.cpp b/Oving 2/Oppg5/Oppg5/loan_drawer.cpp similarity index 100% rename from Øving 2/Øving2_oppg4/Øving2_oppg4/loan_drawer.cpp rename to Oving 2/Oppg5/Oppg5/loan_drawer.cpp diff --git a/Øving 2/Øving2_oppg4/Øving2_oppg4/loan_drawer.h b/Oving 2/Oppg5/Oppg5/loan_drawer.h similarity index 100% rename from Øving 2/Øving2_oppg4/Øving2_oppg4/loan_drawer.h rename to Oving 2/Oppg5/Oppg5/loan_drawer.h diff --git a/Øving 2/Øving2_oppg4/Øving2_oppg4/main.cpp b/Oving 2/Oppg5/Oppg5/main.cpp similarity index 96% rename from Øving 2/Øving2_oppg4/Øving2_oppg4/main.cpp rename to Oving 2/Oppg5/Oppg5/main.cpp index e6fb477..21b4437 100644 --- a/Øving 2/Øving2_oppg4/Øving2_oppg4/main.cpp +++ b/Oving 2/Oppg5/Oppg5/main.cpp @@ -15,7 +15,7 @@ vector CalculateSeries(double loan, double years, double interest) { } vector CalculateAnnuity(double loan, double years, double interest) { - int total = loan * ((interest / 100) /( 1 - pow(1 + interest / 100, -years))); + int total = loan * ((interest / 100) / (1 - pow(1 + interest / 100, -years))); vector payments(10); for (int i = 0; i < years; i++) { payments[i] = total; diff --git a/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4.sln b/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4.sln new file mode 100644 index 0000000..afd9c4a --- /dev/null +++ b/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.271 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oving2Oppg1to4", "Oving2Oppg1to4\Oving2Oppg1to4.vcxproj", "{A1357224-B406-4023-A892-AA8D6CF3C409}" +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 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Debug|x64.ActiveCfg = Debug|x64 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Debug|x64.Build.0 = Debug|x64 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Debug|x86.ActiveCfg = Debug|Win32 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Debug|x86.Build.0 = Debug|Win32 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Release|x64.ActiveCfg = Release|x64 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Release|x64.Build.0 = Release|x64 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Release|x86.ActiveCfg = Release|Win32 + {A1357224-B406-4023-A892-AA8D6CF3C409}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8D537A7E-F206-4DF9-AAC9-BAB34073FA1F} + EndGlobalSection +EndGlobal diff --git a/Øving 2/Øving 2/Øving 2/Øving 2.vcxproj b/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/Oving2Oppg1to4.vcxproj similarity index 97% rename from Øving 2/Øving 2/Øving 2/Øving 2.vcxproj rename to Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/Oving2Oppg1to4.vcxproj index c9d3c38..d309dc2 100644 --- a/Øving 2/Øving 2/Øving 2/Øving 2.vcxproj +++ b/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/Oving2Oppg1to4.vcxproj @@ -1,4 +1,4 @@ - + @@ -20,8 +20,8 @@ 15.0 - {7846fdbb-329b-4890-a7f4-1868d36342fb} - Øving_2 + {a1357224-b406-4023-a892-aa8d6cf3c409} + Oving2Oppg1to4 10.0.17763.0 diff --git a/Øving 2/Øving 2/Øving 2/Øving 2.vcxproj.filters b/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/Oving2Oppg1to4.vcxproj.filters similarity index 100% rename from Øving 2/Øving 2/Øving 2/Øving 2.vcxproj.filters rename to Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/Oving2Oppg1to4.vcxproj.filters diff --git a/Øving 2/Øving 2/Øving 2/main.cpp b/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/main.cpp similarity index 95% rename from Øving 2/Øving 2/Øving 2/main.cpp rename to Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/main.cpp index fb307a7..d74e40d 100644 --- a/Øving 2/Øving 2/Øving 2/main.cpp +++ b/Oving 2/Oving2Oppg1to4/Oving2Oppg1to4/main.cpp @@ -5,7 +5,8 @@ void inputAndPrintInteger() { cout << "Skriv inn et tall: "; - int input = 0; cin >> input; + int input = 0; + cin >> input; cout << "Du skrev: " << input << "\n"; } @@ -30,7 +31,7 @@ bool IsOdd(int number) { } void printHumanReadableTime(int seconds) { - int minSek = 60, timeSek = pow(minSek,2); + int minSek = 60, timeSek = pow(minSek, 2); int timer = seconds / timeSek; int timeLeft = seconds - timer * timeSek; int minutter = timeLeft / minSek; @@ -122,7 +123,7 @@ void SolveQuadradicEquation() { cin >> c; PrintRealRoots(a, b, c); } - + #pragma endregion @@ -160,7 +161,7 @@ bool menyFunc() { SolveQuadradicEquation(); break; default: - cout << "Tast inn et tall mellom 0 og 3. Prøv igjen.\n"; + cout << "Tast inn et tall mellom 0 og 5. Prøv igjen.\n"; break; } return true; @@ -217,13 +218,13 @@ int main() { //NOKtoEUR(); } - + #pragma region Oppgave 3 - Menysystem // a - //while(menyFunc()){} + while (menyFunc()) {} - Gangetabell(14, 14); + //Gangetabell(14, 14); #pragma endregion diff --git a/Øving 2/Øving 2/Øving_2(11.jan)(1).pdf b/Øving 2/Øving 2/Øving_2(11.jan)(1).pdf deleted file mode 100644 index 9901d63..0000000 Binary files a/Øving 2/Øving 2/Øving_2(11.jan)(1).pdf and /dev/null differ diff --git a/Øving 2/Øving2_oppg4/Øving2_oppg4.sln b/Øving 2/Øving2_oppg4/Øving2_oppg4.sln deleted file mode 100644 index d0c0c89..0000000 --- a/Øving 2/Øving2_oppg4/Øving2_oppg4.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.271 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Øving2_oppg4", "Øving2_oppg4\Øving2_oppg4.vcxproj", "{B0D04901-1E2C-4441-AB9A-1D045EB8506A}" -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 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Debug|x64.ActiveCfg = Debug|x64 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Debug|x64.Build.0 = Debug|x64 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Debug|x86.ActiveCfg = Debug|Win32 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Debug|x86.Build.0 = Debug|Win32 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Release|x64.ActiveCfg = Release|x64 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Release|x64.Build.0 = Release|x64 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Release|x86.ActiveCfg = Release|Win32 - {B0D04901-1E2C-4441-AB9A-1D045EB8506A}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E8FF668E-F3F6-43F7-B5FF-DA7CEF5BC2C1} - EndGlobalSection -EndGlobal