diff --git a/CPP.sln b/CPP.sln new file mode 100644 index 0000000..25e3eb6 --- /dev/null +++ b/CPP.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CPP", "CPP\CPP.vcxproj", "{250A8975-78CC-4FA3-B0C8-784AA4DF439F}" +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 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Debug|x64.ActiveCfg = Debug|x64 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Debug|x64.Build.0 = Debug|x64 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Debug|x86.ActiveCfg = Debug|Win32 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Debug|x86.Build.0 = Debug|Win32 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Release|x64.ActiveCfg = Release|x64 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Release|x64.Build.0 = Release|x64 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Release|x86.ActiveCfg = Release|Win32 + {250A8975-78CC-4FA3-B0C8-784AA4DF439F}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F45B57BB-4E21-469D-89F6-112541AD1FCA} + EndGlobalSection +EndGlobal diff --git a/CPP/CPP.vcxproj b/CPP/CPP.vcxproj new file mode 100644 index 0000000..50ad003 --- /dev/null +++ b/CPP/CPP.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + 17.0 + Win32Proj + {250a8975-78cc-4fa3-b0c8-784aa4df439f} + CPP + 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/CPP/CPP.vcxproj.filters b/CPP/CPP.vcxproj.filters new file mode 100644 index 0000000..b310d38 --- /dev/null +++ b/CPP/CPP.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 + + + + + Fichiers sources + + + \ No newline at end of file diff --git a/CPP/Source.cpp b/CPP/Source.cpp new file mode 100644 index 0000000..f4bb164 --- /dev/null +++ b/CPP/Source.cpp @@ -0,0 +1,25 @@ +/* + * Programme de détection de chiffre pairs et impairs + * Par Florian Goussot + * BTS CIEL 2e année + * Fait le 10/09/2024 à Nancy +*/ + +#include + +using namespace std; + +int main(void) { + int nbr; + printf("\t\t\tPair ou impair ?\n"); + printf("Entrez un nombre entier : "); + scanf_s("%d", &nbr); + //printf(nbr % 2 == 0 ? "Le nombre est pair !" : "Le nombre est impair !"); + if (nbr % 2) { + printf("Le nombre est impair !"); + } + else { + printf("Le nombre est pair !"); + } + return 0; +} \ No newline at end of file diff --git a/CPP/Source1.cpp b/CPP/Source1.cpp new file mode 100644 index 0000000..dbad1a1 --- /dev/null +++ b/CPP/Source1.cpp @@ -0,0 +1,32 @@ +/* + * Programme d'affichage du plus grand nombre parmis 3 propositions + * Par Florian Goussot + * BTS CIEL 2e année + * Fait le 10/09/2024 à Nancy +*/ +#include + +using namespace std; + +int main(void) { + int a, b, c; + char key; + printf("\t\t\tLe plus grand\n"); + printf("Entrez trois nombres entiers séparés par des espaces : "); + scanf_s("%d %d %d", &a, &b, &c); + if (b < c) { + b = c; + } + if (a < b) { + a = b; + } + printf("Le nombre le plus grand est %d", a); + printf("\n\nPour quitter, appuyez simultanément sur CTRL+ALT+SHIFT+ALTGR+... juste sur Echap en fait ;)\n\n"); + scanf_s("%c", &key); + if (key == 27) { + return 0; + } + else { + main(); + } +} \ No newline at end of file