Skip to content

Commit

Permalink
Add ex.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-stepien-dev committed Oct 4, 2023
1 parent 0c58a6b commit 159475b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .idea/PPAD.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions 04.10.23 - Vectors/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <iostream>
#include <vector>

using namespace std;

int main() {
vector<unsigned int> arr;
int tempNumb = 0;
bool first = true;

while (tempNumb >= 0) {
if (!first) {
arr.push_back(tempNumb);
}
cout << "Podaj liczbe: ";
cin >> tempNumb;
first = false;
}

sort(arr.begin(), arr.end());

cout << "Posortowane numery: ";
for (auto numb : arr) {
cout << numb << " ";
}
return 0;
}

0 comments on commit 159475b

Please sign in to comment.