Niveau 3.4 C++ opgave samling

Задание 1

Givet en array med tal

cppint arr[] = [1, -2, -3, 4, -5, 6];

Tæl antallet af negative tal i denne array.

Задание 2

Givet et helt tal:

cppint num = 1357;

Kontroller, at alle cifre i dette tal er ulige.

Задание 3

Givet et tal:

cppint 12345

Opnå en array af dette tals cifre:

cppint[] {1, 2, 3, 4, 5}
Задание 4

Givet to arrays:

cppint arr[]1 = [1, 2, 3];
int arr[]2 = [4, 5, 6];

Kombiner disse arrays til én:

cppint[] {1, 2, 3, 4, 5, 6}