First Programs

Lab Assignment

  1. Greeting
    1. Create a project titled Lab1_Greeting add source file titled greeting.cpp to the project. Enter the following code in the source file:

      Specify appropriate name and date.

      Note:You cannot cut-and-paste the source code, you have to manually enter it into the source file.

    2. Build, debug, and run your project.
    3. Study subversion submission instructions.
    4. Submit your project and verify your submission on the web. To verify your project submission, in a web-browser, type in the URL that you used for subversion. The browser will also prompt you for the login name/password. Use the same ones as for subversion. It will show you your submission as a webpage. Click on individual files to make sure that the contents of the files is correct.

  2. Mini sort. Create a project titled Lab1_Sort. Cut and paste this example program into your project. The program attempts to sort three integer numbers in the increasing order. However, it is incomplete. For example, it does not work for this input 3 2 1

    Hint: to correct the program you need to add another swapping of values between variables x and y.

    Submit the corrected program to the subversion repository.

  3. Home Installation. Set up Microsfot Visual Studio C++ at home. Home installation instructions are posted here. To verify the correctness of home installation, check out your submitted projects, compile and run it, and then check it back in.