C++ Taskbook Level 1.5

Задание 1

Tell me how many bytes a number of type int takes.

Задание 2

Print to the console all numbers that are multiples of 7 in the range from -100 to 100.

Задание 3

Given two integers, check that the first digits of these numbers match.

Задание 4

Two integers are given:

cppint num1 = 36;
int num2 = 12;

Check that the first number is divisible by the second without remainder.

Задание 5

Given a string:

cppstd::string str = "123456789";

Loop through and output to the console one by one all characters from the end of the line.

Задание 6

Three integers are given:

cppint num1 = 36;
int num2 = 24;
int num2 = 12;

Print the larger of these numbers to the console.

Задание 7

Three symbols are given:

cppchar chr1 = 'a';
char chr2 = 'b';
char chr3 = 'c';

Merge these characters into a string:

cppstd::string "abc"
Задание 8

Given an integer containing the number of kilobytes:

cppint kb = 35;

Convert this value to bytes.

Задание 9

Given an integer containing a day number from 1 to 31:

cppunsigned int num = 1;

Determine which decade of the month this day falls in.