Converted everything to orgmode
converted everything to orgmode and added solution to the README files
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
* Task
|
||||
|
||||
Let `a`, `b`, `c`, and `d` be variables of type `int`.
|
||||
Let =a=, =b=, =c=, and =d= be variables of type =int=.
|
||||
|
||||
- Which of the following character sequences are valid expressions in the sense that they are accepted by a C++ Compiler? Explain your answer.
|
||||
|
||||
@@ -15,7 +15,7 @@ Let `a`, `b`, `c`, and `d` be variables of type `int`.
|
||||
|
||||
Assume that all the variables have been defined and correctly initialized and that all expressions are completely independent from each other.
|
||||
|
||||
- For each of the expressions that you have identified as valid, decide whether the entire expression is an `lvalue` or an `rvalue`, and explain your decision.
|
||||
- For each of the expressions that you have identified as valid, decide whether the entire expression is an =lvalue= or an =rvalue=, and explain your decision.
|
||||
|
||||
- Determine the values of the expressions that you have identified as valid and explain how these values are obtained.
|
||||
|
||||
|
@@ -3,11 +3,11 @@
|
||||
|
||||
* Task
|
||||
|
||||
/This task is a text-based task but mostly automatically checked. You are required to write your answers into `submission.txt` by replacing the question marks with the correct solution. Please, do not change the line formating./
|
||||
/This task is a text-based task but mostly automatically checked. You are required to write your answers into =submission.txt= by replacing the question marks with the correct solution. Please, do not change the line formating./
|
||||
|
||||
/You can check whether your solution is correct by clicking on the test button./
|
||||
|
||||
Numbers can be provided in various formats in C++. Literals prefixed with `0b` indicate binary encoding. Assume unsigned arithmetics with sufficient numbers of bits, i.e. no overflows. Convert the following binary numbers into decimal numbers (1-4) and decimal numbers to binary (5-8):
|
||||
Numbers can be provided in various formats in C++. Literals prefixed with =0b= indicate binary encoding. Assume unsigned arithmetics with sufficient numbers of bits, i.e. no overflows. Convert the following binary numbers into decimal numbers (1-4) and decimal numbers to binary (5-8):
|
||||
|
||||
#+begin_src txt
|
||||
# Lines starting with # are comments. Spaces is ignored.
|
||||
|
@@ -16,9 +16,9 @@ We assume that \(R_1\), \(R_2\), \(R_3\), and \(R_4\) have an integer valued res
|
||||
|
||||
You can find formulas for computing the total resistance in this [[https://en.wikipedia.org/wiki/Resistor#Series_and_parallel_resistors][Wikipedia article]].
|
||||
|
||||
*Important:* using anything other than `int` (e.g., floating point numbers, `long`, or `double long`) is forbidden.
|
||||
*Important:* using anything other than =int= (e.g., floating point numbers, =long=, or =double long=) is forbidden.
|
||||
|
||||
*Important:* using `if-else` and any other branches is forbidden.
|
||||
*Important:* using =if-else= and any other branches is forbidden.
|
||||
|
||||
* Solution
|
||||
|
||||
|
Reference in New Issue
Block a user