Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

задели общий гитигнор

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.idea
/cmake-build-debug
/sem2/.idea
/sem2/TayKorol/miniHW2
/sem2/TayKorol/miniHW3
Binary file added sem2/TayKorol/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sem2/TayKorol/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sem2/TayKorol/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sem2/TayKorol/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions sem2/TayKorol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Домашние задания по C++ (2 семестр, 1 курс, ШРВ)

**Автор:** Королева Таисия Дмитриевна, 334912

**Группа:** J3102

**Условия МиниДЗ:**
1. ![Условие МиниДЗ№1](1.jpg)
2. ![Условие МиниДЗ№2](2.png)
3. ![Условие МиниДЗ№3](3.png)
4. ![Условие МиниДЗ№4](4.png)
25 changes: 25 additions & 0 deletions sem2/TayKorol/miniHW4/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

int main() {
std::vector<std::string> strings = {"Hello", "World", "C++", "Lambda", "Expression"};


auto getLengths = [](const std::vector<std::string>& vec) {
std::vector<size_t> lengths;
for (const auto& str : vec) {
lengths.push_back(str.size());
}
return lengths;
};

std::vector<size_t> lengths = getLengths(strings);

for (size_t i = 0; i < strings.size(); ++i) {
std::cout << "String \"" << strings[i] << "\" has length of " << lengths[i] << std::endl;
}

return 0;
}