Project #1
Due: 10 PM, Thursday 1/11
This assignment is an exercise for you to enter, compile and run a simple C++ program by SSH-ing into the undergrad computer lab. Look over the using SSH handout if you're having trouble. For each part you must turn-in the following:
-
A zip file (tar, gzip or zip) containing all of the source code for your program, submitted via Blackboard. You must include a comment header with your name, e-mail, this course (600.109), the date, your CS unix account name and the assignment number on every program you write.
-
Remember that programs that don't compile on the ugradx machines receive NO credit. Make sure you staple together all the printouts for your assignment! You should always use good programming style, including indentation, spacing and descriptive variable names. You should include comments to describe what is going on in your program.
Weighing In [10 points]
Write a program which will output the ideal weight for a male and a female based on height and the following formulas. The input to the program should be the height of a person, in feet and inches. The output should be the ideal male and female weights, in pounds, appropriately labelled. You can assume that all inputs are between 5 and 7 feet. For men: weight is 115 lbs for the first 5 feet and 7 pounds for every inch after that. For women: weight is 100 lbs for the first 5 feet and 5 pounds for every inch after that. [Disclaimer: this project is in no way intended to give real medical advice to anyone.] Be sure to use constants for literal values that are part of the problem, and good variable names. You must name your program file pg1a.cpp.