Display a linear combination: Difference between revisions
Content deleted Content added
No edit summary |
Add tests lists to task description |
||
Line 12:
* you don't show scalars when they are equal to one or minus one. For instance the string "1*e(3)" is wrong.
* you don't prefix by '-' if it follows a preceding term. Instead you use subtraction. Thus "e(4) - e(5)" is correct while "e(4) + -e(5)" is wrong.
Show here output for the following lists of scalars:
<pre>1) 1.1, 2.2, 3.4
2) 0, 1.1, 2, 3
3) 1.1, 0, 3.3, 4.4
4) 1.1, 2.2, 0.0
5) 0.0, 0, 0.0
6) 0
7) 1, 1, 1.0
8) -1.0, -1, -1
9) -1.1, -2.2, -3.3
10) -1</pre>
|