Task 1 fixed

This commit is contained in:
2024-11-16 07:40:32 +03:00
parent ae0196994e
commit eb8b9a96ff
2 changed files with 30 additions and 9 deletions

View File

@@ -4,9 +4,32 @@
#include <iostream>
bool* sum(bool* a, bool* b, unsigned char size)
{
bool isZero(bool* a, int size) {
for (int i = 0; i < size; i++) {
if (a[i] == 1) {
return false;
}
}
return true;
}
bool* sum(bool* a, bool* b, int size)
{
bool* result = new bool[size]();
bool* remainder = new bool[size]();
for (int i = 0; i < size; i++)
{
remainder[i] = b[i];
}
while (!isZero(b, size))
{
for (int i = 0; i < size; i++)
{
}
}
}
int main() {