.. (לתיקייה המכילה) | ||
Can we use the function sqrt() from math.h library in question 1? | |
Yes |
Can/Should we use strings/arrays in this assignment? | |
You are not expected to know anything beyond chapter 4 for this assignment. In this case, since you have not learn strings yet, you are not expected to use them in the assignment (although you can if you are sure that you know what you are doing). |
What is the story with precision of floating point numbers (questions 2)? | |
As (will be) discussed in class a variable of type double uses 8 bytes for storing floating-point numbers. Therefore it can keep only a limited number of digits after the floating point (~15), which may be an issue when comparing two floating point numbers. Therefore it is generally not a good idea to compare two doubles, since the result may be influenced by the limited precision; here we overcome this issue by considering only the first 3 digits after the floating point. |
Can we use the function sqrt() in question 2? | |
Yes, as was written in the assignment... |
Can we write our own functions? | |
Yes (if you already know how to do that, we will learn later in the course), but the assignment does not require the use of functions, of course. |
In question 1, what should the program do after pushing ENTER ('/n')? | |
ENTER represents the end of input and not necessary the end of the program. |
In question 1, it is said that the field width should be 10 characters, but in your example you have field with 15 chars (=9876MNOPefghi;). | |
You should distinguish between input and output. 15 characters you are talking about is input and it is not limited in size. In the input you get characters one by one. The corresponding output is per one char so 10 characters for it is enough. |
Can I assume in question 4 that the source number is integer (shalem)? | |
Yes |
What do you mean by the legal date format in question 3? | |
The assumption is about the range of days/month/years. You should check in the question that the format is right: 12/12/2006 - valid 12.12.2006 - invalid |
Should we consider the possibility of negative coordinates input? | |
Yes |
In question 2, are the following inputs are valid: | |
A. illegal B. legal |
In case of illegal input in question 2, what should the program do? | |
You should print appropriate error message and finish the program. |
In question 1, it is written that each field width should be 10. Should the 1st field width also be 10? | |
You can start printing only form the second output value with field width 10. |
Bug fixes, question 4 | |
1. The range of input numbers has been reduced to 0-32,767(2^15-1). This change does not affect anyone who already handed the assignment, and was done in order to be consistent with the slides. 2. The last algorithm for converting a number from base 10 to the target base was modified, since it contained a few inaccuracies. See v1.01 of the assignment, from the assignments section. |