|
CP107 LAB 1 Pre-LabInstructor will introduce the use of the Microsoft Visual C++ environment for entering in a program, compiling and running it. We will use Microsoft Visual C++ Version 6 compiler and it is installed on all the lab machines. A student version of the compiler is also included on the CD that comes with you book. If you plan on doing home work assignments at home, you should install this compiler on the your PC.Instructor will demonstrate debugging features available in the compiler. VERY IMPORTANT!
Pre-LAB OBJECTIVES: Write a very simple C++ program, compile and link the program and be able to run the program Pre-LAB ASSIGNMENT: 1. Write a program that displays a line of dashes, three blank lines followed by your name, street address, city/state/zip on separate lines. Please put your real name. You can put a dummy address. Display three more blank lines and a line of dashes. The output of this program should look like the following: ------------------------------------------------------------------------------------------------
Your Name Your Address City, State zip code
------------------------------------------------------------------------------------------------ Submit the program as name.cpp
LAB ASSIGNMENT 1
LAB OBJECTIVES
1a) Write a program
does the following:
Submit the program as vars.cpp
1b) Write a program to determine the area and circumference of a circle given its radius and display the results to the screen. The program will display instructions to the user followed by a prompt for entering the radius. You may use the value of PI to be 3.14159. The formula for area of a circle is PI times the radius squared. The formula for circumference is 2 times PI times the radius. Submit the program as circ.cpp Please follow the guidelines for program documentation given in the Lab Rules handout under criteria for grading the lab.
|
Copyright (c) Yusuf Family Website 2001 |