diff --git a/17/Lab17/Lab17.cpp b/17/Lab17/Lab17.cpp new file mode 100644 index 0000000..34827f6 --- /dev/null +++ b/17/Lab17/Lab17.cpp @@ -0,0 +1,31 @@ +#include +#include +#include + +using namespace std; + +int findFirstDigitIndex(string str) { + for (int i = 0; i < str.length(); i++) { + if (isdigit(str[i])) { + return i; + } + } + return -1; +} + +int main() { + + SetConsoleOutputCP(CP_UTF8); + + string inputStr; + cout << "Введіть строку: "; + cin >> inputStr; + int index = findFirstDigitIndex(inputStr); + if (index >= 0) { + cout << "Індекс першої цифри в цій строчці: " << index << endl; + } + else { + cout << "No digit was found in the input string." << endl; + } + return 0; +} diff --git a/17/Lab17/Lab17.sln b/17/Lab17/Lab17.sln new file mode 100644 index 0000000..a54fe14 --- /dev/null +++ b/17/Lab17/Lab17.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32929.385 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab17", "Lab17.vcxproj", "{1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}" +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 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Debug|x64.ActiveCfg = Debug|x64 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Debug|x64.Build.0 = Debug|x64 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Debug|x86.ActiveCfg = Debug|Win32 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Debug|x86.Build.0 = Debug|Win32 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Release|x64.ActiveCfg = Release|x64 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Release|x64.Build.0 = Release|x64 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Release|x86.ActiveCfg = Release|Win32 + {1B90F389-90A2-4CFB-96E9-8C34C6CB39EA}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1E4A09AC-4543-4EDD-BDF5-88D13C4F100F} + EndGlobalSection +EndGlobal diff --git a/17/Lab17/Lab17.vcxproj b/17/Lab17/Lab17.vcxproj new file mode 100644 index 0000000..eb69a1f --- /dev/null +++ b/17/Lab17/Lab17.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {1b90f389-90a2-4cfb-96e9-8c34c6cb39ea} + Lab17 + 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/17/Lab17/Lab17.vcxproj.filters b/17/Lab17/Lab17.vcxproj.filters new file mode 100644 index 0000000..0b09749 --- /dev/null +++ b/17/Lab17/Lab17.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 diff --git a/17/Lab17/Lab17.vcxproj.user b/17/Lab17/Lab17.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/17/Lab17/Lab17.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/17/Lab17/x64/Debug/Lab17.exe b/17/Lab17/x64/Debug/Lab17.exe new file mode 100644 index 0000000..3576f32 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.exe differ diff --git a/17/Lab17/x64/Debug/Lab17.exe.recipe b/17/Lab17/x64/Debug/Lab17.exe.recipe new file mode 100644 index 0000000..8c30b1f --- /dev/null +++ b/17/Lab17/x64/Debug/Lab17.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\2 семестр\Технології програмування\Lab17\Lab17\x64\Debug\Lab17.exe + + + + + + \ No newline at end of file diff --git a/17/Lab17/x64/Debug/Lab17.ilk b/17/Lab17/x64/Debug/Lab17.ilk new file mode 100644 index 0000000..b62e86b Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.ilk differ diff --git a/17/Lab17/x64/Debug/Lab17.log b/17/Lab17/x64/Debug/Lab17.log new file mode 100644 index 0000000..eddde96 --- /dev/null +++ b/17/Lab17/x64/Debug/Lab17.log @@ -0,0 +1,2 @@ + Lab17.cpp + Lab17.vcxproj -> D:\2 семестр\Технології програмування\Lab17\Lab17\x64\Debug\Lab17.exe diff --git a/17/Lab17/x64/Debug/Lab17.obj b/17/Lab17/x64/Debug/Lab17.obj new file mode 100644 index 0000000..c304aa6 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.obj differ diff --git a/17/Lab17/x64/Debug/Lab17.pdb b/17/Lab17/x64/Debug/Lab17.pdb new file mode 100644 index 0000000..fc8c6c0 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.pdb differ diff --git a/17/Lab17/x64/Debug/Lab17.tlog/CL.command.1.tlog b/17/Lab17/x64/Debug/Lab17.tlog/CL.command.1.tlog new file mode 100644 index 0000000..e99bc29 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.tlog/CL.command.1.tlog differ diff --git a/17/Lab17/x64/Debug/Lab17.tlog/CL.read.1.tlog b/17/Lab17/x64/Debug/Lab17.tlog/CL.read.1.tlog new file mode 100644 index 0000000..702e309 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.tlog/CL.read.1.tlog differ diff --git a/17/Lab17/x64/Debug/Lab17.tlog/CL.write.1.tlog b/17/Lab17/x64/Debug/Lab17.tlog/CL.write.1.tlog new file mode 100644 index 0000000..317cf38 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.tlog/CL.write.1.tlog differ diff --git a/17/Lab17/x64/Debug/Lab17.tlog/Lab17.lastbuildstate b/17/Lab17/x64/Debug/Lab17.tlog/Lab17.lastbuildstate new file mode 100644 index 0000000..e52f846 --- /dev/null +++ b/17/Lab17/x64/Debug/Lab17.tlog/Lab17.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0: +Debug|x64|D:\2 семестр\Технології програмування\Lab17\Lab17\| diff --git a/17/Lab17/x64/Debug/Lab17.tlog/link.command.1.tlog b/17/Lab17/x64/Debug/Lab17.tlog/link.command.1.tlog new file mode 100644 index 0000000..128ee70 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.tlog/link.command.1.tlog differ diff --git a/17/Lab17/x64/Debug/Lab17.tlog/link.read.1.tlog b/17/Lab17/x64/Debug/Lab17.tlog/link.read.1.tlog new file mode 100644 index 0000000..d33e1f6 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.tlog/link.read.1.tlog differ diff --git a/17/Lab17/x64/Debug/Lab17.tlog/link.write.1.tlog b/17/Lab17/x64/Debug/Lab17.tlog/link.write.1.tlog new file mode 100644 index 0000000..8c30224 Binary files /dev/null and b/17/Lab17/x64/Debug/Lab17.tlog/link.write.1.tlog differ diff --git a/17/Lab17/x64/Debug/Lab17.vcxproj.FileListAbsolute.txt b/17/Lab17/x64/Debug/Lab17.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..c7a89ca --- /dev/null +++ b/17/Lab17/x64/Debug/Lab17.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +D:\2 семестр\Технології програмування\Lab17\Lab17\x64\Debug\Lab17.exe diff --git a/17/Lab17/x64/Debug/vc143.idb b/17/Lab17/x64/Debug/vc143.idb new file mode 100644 index 0000000..f7526e9 Binary files /dev/null and b/17/Lab17/x64/Debug/vc143.idb differ diff --git a/17/Lab17/x64/Debug/vc143.pdb b/17/Lab17/x64/Debug/vc143.pdb new file mode 100644 index 0000000..539c682 Binary files /dev/null and b/17/Lab17/x64/Debug/vc143.pdb differ