AMAT-2120, Lab4

Contents

We started with a program considered in class on Wednesday:     lab4.c

and ended up with the following enhanced versions:

    Thursday's program     Friday's program

General comments

1. The function scanf is used for interactive input (see Sect.3.3). It will be discussed in class. Normally, before doing scanf, you have to printf a prompt asking the user to enter the value.

2. Statements beginning with # are called preprocessor directives. Their purpose and syntax are different from those of the proper C statements. In fact, the gcc command and its analogs first invoke the so called preprocessor, which looks exclusively at the #-statements and creates an intermediate, #-free, code. The C compiler is then invoked to process that intermediate code. See p.113.

3. The computer algebra system Maple (ver.7) will be used in this course at a rather primitive level, just as a powerful calculator. The command to invoke Maple-7 in a mode detached from the console is xmaple.

Comments to Thursday's program

Comments to Friday's program