TWiki
>
CS107 Web
>
Sum15
>
AssignmentsSum15
>
Proj1sum15
(2015-06-18, Main.troy)
(raw view)
E
dit
A
ttach
---+ CS 107 - Summer 2015 ---+++ Programming Project 1 Due: Tuesday 6/30/15 at 11:59pm *I Weigh What Where???* Write a "C+" program were the user will enter his/her weight and the name of a planet. The program is to output the amount that person would weigh on that planet. The following table give the factor by which the weight must be multiplied for each planet. | <strong>Planet</strong> | <strong>Weight Factor</strong> | | Mercury | 0.4155 | | Venus | 0.8975 | | Earth | 1.0 | | Moon | 0.166 | | Mars | 0.3507 | | Jupiter | 2.5374 | | Saturn | 1.0677 | | Uranus | 0.8947 | | Neptune | 1.17794 | | Pluto | 0.0899 | The program is to give an error message if the user doesn't type in a correct planet name or if the user give a negative weight amount. The planet name will expect the first letter to be capitalized, but the rest of the letters to be lower case. Your program is to prompt the user for the input. One prompt for the weight amount and a second prompt for the palnet name. All output and prompts must be decriptive and neatly formatted. Your code must be properly formatted and appropriately commented. These items should include: * meaningful variable names * use of aligned indentation * use of blank lines * in-line commenting * block commenting at the beginning of the program You are to submit the code electronically through UIC Blackboard.
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2015-06-18 - 21:24:00 - Main.troy
CS107
Syllabus
Summer 2015 Home
Lecture Notes
Assignments
Example Programs
[edit this menu
]
Log In
CS107 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
ABOUT US
Our Department
Recent News
Contact Us
ACADEMICS
Prospective Students
Undergraduate
CS Minor
Graduate
Courses
RESEARCH
Overview
By Faculty
Labs
PEOPLE
Faculty
Adjuncts
Staff
Students
Alumni
Copyright 2016 The Board of Trustees
of the University of Illinois.
webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF