.. (לתיקייה המכילה) | ||
In Question 1, what should the program do, if user does not input numbers (or supply numbers in wrong format), i.e. if scanf fails? | |
The program should end without additional prints. |
Can I use < math.h >? | |
Yes. In particular function fabs could be used to calculate an absolute value of a floating point number. |
In Question 1, which types should I use? | |
double |
In question 2, should I ignore white spaces? | |
Yes. Use scanf(" %c", ... to achieve this effect. |