C++ Taskbook Level 1.3
Explain the difference between the short
type and the int
type.
Print to the console all integers from 1
to 100
.
Given a string, if there is more than one character in the string, print the second to last character of the string to the console.
Given an integer, check that the first and last digits of this number match.
Two integers are given:
int num1 = 36;
int num2 = 12;
Print the larger of these numbers to the console.
Given a string containing an integer:
std::string str = "123";
Convert this string to a number:
unsigned int 123
Given an integer containing a month number from 1
to 12
:
unsigned int num = 1;
Determine what season this month falls in.