CS 23021 Homework Assignment 3 - if and while practice

Overview This assingment will have two parts. For the first part you will code a number of if statements. This will give you practice in writing if statements for various conditions. For the second part of this assignment you will code a number of while statements This will give you practice in writing various while loops.
Set up for the Assignment

To get the files and get set up do the following.

First update (if necessary) the shared files:

  login in to loki
  cd 			# Go to home dir
  cd cs23021_shared 	# Go into shared working copy
  svn update  		# Get update from repository

Then create the directory and copy the files:

  cd 							# Go to home dir
  cd cs23021  						# Go into your working copy
  svn mkdir HW2 					# Make dir for HW2
  cd HW2 						# Go into new dir
  cp ../../cs23021_shared/HW2/if.cpp if.cpp     	# Copy if.cpp from shared to current dir 
  cp ../../cs23021_shared/HW2/while.cpp while.cpp 	# Copy while.cpp from shared to current dir 
  svn add if.cpp 					# Add to versioning
  svn add while.cpp 					# Add to versioning
  svn commit -m "set up for hw3 done"  		# Commit
Part 1. Follow the instructions in the comments at the top of the if.cpp file.
Part 2. Follow the instructions in the comments at the top of the while.cpp file.
Requirements The general program requirements apply.
Turning In Make sure your files are in the repository.