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
//TASK 1 | |
#include <iostream> | |
char* my_strchr(const char* str, int c) | |
{ | |
while (*str != '\0') | |
{ | |
if (*str == c) | |
{ |
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
//TASK 1 | |
#include <iostream> | |
void remove_symbol(char* str, int index) | |
{ | |
int len = std::strlen(str); | |
if (index < 0 || index >= len) | |
{ |
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
//TASK 1 | |
#include <iostream> | |
void fill_array(int* arr, int size) | |
{ | |
for (int i = 0; i < size; ++i) | |
{ | |
std::cout << "Введите [" << i << "] " << "элемент массива: "; | |
std::cin >> 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
//TASK 1 | |
#include <iostream> | |
void copy_array(int* arr, int* copied_arr, int size) | |
{ | |
if (size > 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
//TASK 1 | |
#include <iostream> | |
int main() | |
{ | |
setlocale(LC_ALL, ""); | |
const int ROWS = 3; | |
const int COLS = 4; |
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
//TASK 1 | |
#include <iostream> | |
void draw_rectangle(const int height, const int width) | |
{ | |
std::cout << "+"; | |
for (int i = 0; i < width; ++i) | |
{ | |
std::cout << "-"; |
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
//TASK 1 | |
#include <iostream> | |
#include <cmath> | |
double numberInPow(int a, int b) | |
{ | |
return pow(a, b); | |
} |
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
//TASK 1 | |
#include <iostream> | |
void cube(int a) | |
{ | |
int sum = a * a * a; | |
std::cout << sum; | |
} |
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
//TASK 1 | |
#include <iostream> | |
int main() | |
{ | |
setlocale(LC_ALL, ""); | |
const int SIZE = 10; | |
int arr[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
//TASK 1 | |
#include <iostream> | |
int main() | |
{ | |
setlocale(LC_ALL, ""); | |
int a = 100; | |
int sum = 0; |
NewerOlder