This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| int y; | |
| for (int i = 2; i <= 4; i++) | |
| { | |
| y = pow(2, i) - 2 * pow(i, 2) - 1; | |
| cout << "y=" << y << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| int n; | |
| cout << "enter n"; | |
| cin >> n; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| int n; | |
| cout << "Enter size: "; | |
| cin >> n; | |
| int matrix[30][30]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int n; | |
| cout << "Enter size: "; | |
| cin >> n; | |
| for (int i = 0; i < n; i++) { | |
| for (int j = 0; j < n; j++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 | |
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int SIZE = 10; | |
| int array1[SIZE]; | |
| int array2[SIZE]; | |
| int resultArray[SIZE]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 | |
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int SIZE = 10; | |
| int array[SIZE]; | |
| int sum = 0; | |
| int count = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int arr[12] = {99, 85, 72, 64, 58, 50, 45, 33, 25, 12, 7, 3}; | |
| for (int i = 0; i < 12; i++) | |
| { | |
| cout << arr[i] << " "; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int sizeTotal = 12; | |
| const int sizeHalf = sizeTotal / 2; | |
| int arrTotal[sizeTotal]; | |
| int arrAsc[sizeHalf]; | |
| int arrDesc[sizeHalf]; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int size = 15; | |
| int arr[size]; | |
| srand(time(0)); | |
| for (int i = 0; i < size; ++i) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int SIZE = 1000; | |
| int array[SIZE]; | |
| int max = 30; | |
| int min = -30; | |
| for (int i = 0; i < SIZE; ++i) | |
| { |
OlderNewer