initial commit
This commit is contained in:
22
C++/lesson3/task6.cpp
Normal file
22
C++/lesson3/task6.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include <iostream>
|
||||
|
||||
void bubbleSort(int data[], int lenD) {
|
||||
int tmp = 0;
|
||||
for (int i = 0; i < lenD; i++) {
|
||||
for (int j = (lenD - 1); j >= (i + 1); j--) {
|
||||
if (data[j] < data[j - 1]) {
|
||||
tmp = data[j];
|
||||
data[j] = data[j - 1];
|
||||
data[j - 1] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
int a[3] = {1, 3, 5};
|
||||
int b[3] = {0, 2, 4};
|
||||
|
||||
int c[6];
|
||||
for (int)
|
||||
}
|
Reference in New Issue
Block a user