Lab 1

******

Use your CS account number to log in: https://www.cs.uic.edu/bin/view/ComputerSupport/Accounts(or google "UIC CS ACCOUNT")

Password is your UIN, the 9-digit number

******

Today's lab is about compiling and running simple C programs, using some file editor and/or the command line on the CS Department Mac Lab in SEL 2254.

To get credit you must work with a partner, taking turns every ~10 minutes on who types ("driver") and who gives input ("navigator").

You must finish question 0. Each question after that is worth one point.  You should aim to also finish questions 1 and 2, for a total of 2 points.  Finishing question 3 is extra credit. 

Please raise your hand and show me you and your partners' work during the last 10 mins of lab so we can grade your work. Late submissions are not accepted.

Instructions on Writing and Executing Code

Sample Program

Use the sample code shown below as a starting point:

#include <stdio.h>

void displayIdentifyingInformation()

{

   printf("My name is: Inigo Montoya  \n");

   printf("My lab is:   \n");

   printf("Today's date is:   \n");

}

int main()

{

   // Question 0

   displayIdentifyingInformation();  // Call that function

   // For questions 1,2,3 prompt for a number and read it in to a variable

   int number;

   printf("Enter a number: ");

   scanf("%d", &number);

   // Loop to display multiple characters

   // For questions 1,2,3 modify the code below

   for( int i=0; i<number; i++) {

      printf("*");

   }

   // The end

   printf("\n Done with program. \n");

   return 0;

}

Stages of What you Need to write

      0. Change the function displayIdentifyingInformation() to display you and your partner's names and other information.