Write a Program

  1. Write a C++ program call it lab2.cpp in Visual C++ or hercules.
  2. The output should be similar to the following. Please enter different numbers to test your program.
    This program adds two integers!
    Please enter the first number:   3
    Please enter the second number:  2
    The sum of the two numbers is:   5
    
  3. Compile and run lab2.cpp in Visual C++ or hercules.
  4. Once you are happy with the program output, make a screenshot. and call it lab2.jpeg or lab2.png
  5. Show your lab instructor lab2.jpeg or lab2.png
  6. Transfer the finished lab2.cpp to your herucles account.
  7. Use Script command to capture the program and the program output into a file called lab2.log.
    There are 8 steps you need to do in Script. If you forget how to use script, refer to Script link
  8. Show your lab instructor lab2.log

Copyright: Department of Computer Science, University of Regina.