![]() |
.. (לתיקייה המכילה) | |
Where is the example program for using log10? | |
It is located in the attached link. | |
קישור: Link: Ссылка: وصلة: | http://webcourse.technion.ac.il/234114/Winter2002-2003/hw/WCFiles/log10.c |
In q1, how do we know when the input series ends? | |
The program reads the input from a FILE (using redirections, as learned in the I/O tutorial, pages 25-26 in the booklet). Pay attention that the series ends when scanf fails (returns EOF or any number < 3). |
In q1 in function f5, what happens if x+y-2<2? (i starts from 2) | |
Pay attention that in f5 if x+y-2<2 then there are no elements to sum, therefore the result is 0. |
In q1, is f4 supposed to be constant in relation to y? | |
Yes. It should still get the y as one of the parameters, but the value is not used. |
In q3, the clock function, what should we do if we get the following input: C 1 70 0 | |
As written in the hw itself, a check should be made if the hour is legal. The hour 1:70:00 is not legal, therefore an error message should be printed. |
In q3, the triangle function, it says that the numbers have to be straightend to the right, what numbers? | |
Ignore this sentence, no need to straighten to the right. |
In q1 f5 is defined as the product of loglog(i) starting from i=2 and so the first element is [loglog(2)]=[-0.52]=0 and so the value of f5 is always 0 !! | |
Assume that i starts from 11 (Note that now you have to check that x+y-2 >= 11) |