Introduction to Computer Science - Fall 2009
CSCI 151
Lab 4

  
Objectives:
practice with basic LINUX commands,
equality and relational operators, if, if else, if else if , statements;
compiling and executing C code.   

LAB 4 consists of PRACTICE PART ONLY


Practice PART:

  1. Login to the system using your login name and the initial password
  2. Change to your CSCI151 directory: cd CSCI151
  3. Create a new directory lab4 under your CSCI151 directory: mkdir lab4
  4. Change to lab4 directory: cd lab4
  5. All programs that you will write in this lab you will save in your lab4 directory. Important: Start each of your programs with comment part that includes:
    your first and last names
    your e-mail
    today's day
    the name of the program ( the name of the file)
    the short description what this program is doing
    list of the variables with the short description for each variable - name, type, purpose (this information could be written in the declaration of the variable section of your program)
  6. In all programs you have to explain what is the meaning of the results that your program is printing. Don't print numbers without any explanation! Be CREATIVE!! Explain, why this output is printed.

  7. Program 1

  8. Program 2 :

  9. Program 3:

  10. Program 4: