Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS 317 Computer Science I Assignment: C++ Programming, Quizzes of Computer Science

The instructions for assignment 2 of cs 317 computer science i course by lionel m. Holguin jr. The assignment includes two programming tasks: writing a c++ program to output a passage by dr. Seuss and writing a program to convert temperatures from fahrenheit to celsius. The document also provides hints and tips for the implementation.

Typology: Quizzes

2010/2011

Uploaded on 10/14/2011

meganchandler
meganchandler 🇺🇸

5 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 317 Computer Science I Lionel M. Holguin Jr.
8 Sept 2011 Chapter 2 Assignment
1. (50 Points) Write a C++ program that will output this passage by Dr. Seuss. Make sure your
output looks exactly as shown here (including spacing, line breaks, punctuation, and the title and
author).
When a fox is in the bottle
where the tweetle beetles battle
with their paddles in a puddle
on a noodle-eating poodle,
THIS is what they call...
... a tweetle beetle noodle poodle
bottled paddled muddled duddled
fuddled wuddled fox in socks, sir!
-- from "Fox in Socks" by Dr. Seuss
Hints and tips:
To make your output continue on a new line, try this as part of your cout statement: <<
endl (that's short for end line).
To include a quotation mark in your output, try this: \"
2. (50 Points) Write a program that asks the user to enter a temperature in degrees Fahrenheit,
then prints out the equivalent temperature in degrees Celsius.
Temperatures aren't always whole numbers (example: body temperature 98.6°F) so use decimal
numbers and float variables in this program.
For the sample output you hand in, run the program at least twice, including once with a decimal
number as the input.
Please include your source files, executable files and a screenshot of your program after execution.
Make a folder for each program then move your files into the respective folder zip all the folders and
then turn them in thru Blackboard.
Extra Credit
For 5 points: Make your program round off the Celsius temperature to the nearest tenth
(example: 23.8° Celsius). See "Output Formatting" in textbook section 3.9 for help.
For 5 more points: Besides everything described above, also write a second program that prints
out a °F to °C conversion table. Show temperatures from -50.0°F to 120.0°F in 10.0° increments.

Partial preview of the text

Download CS 317 Computer Science I Assignment: C++ Programming and more Quizzes Computer Science in PDF only on Docsity!

CS 317 Computer Science I Lionel M. Holguin Jr. 8 Sept 2011 Chapter 2 Assignment

  1. (50 Points) Write a C++ program that will output this passage by Dr. Seuss. Make sure your output looks exactly as shown here (including spacing, line breaks, punctuation, and the title and author). When a fox is in the bottle where the tweetle beetles battle with their paddles in a puddle on a noodle-eating poodle, THIS is what they call... ... a tweetle beetle noodle poodle bottled paddled muddled duddled fuddled wuddled fox in socks, sir! -- from "Fox in Socks" by Dr. Seuss Hints and tips:  To make your output continue on a new line, try this as part of your cout statement: << endl (that's short for end line).  To include a quotation mark in your output, try this: "
  2. (50 Points) Write a program that asks the user to enter a temperature in degrees Fahrenheit, then prints out the equivalent temperature in degrees Celsius. Temperatures aren't always whole numbers (example: body temperature 98.6°F) so use decimal numbers and float variables in this program. For the sample output you hand in, run the program at least twice, including once with a decimal number as the input. Please include your source files, executable files and a screenshot of your program after execution. Make a folder for each program then move your files into the respective folder zip all the folders and then turn them in thru Blackboard. Extra Credit For 5 points: Make your program round off the Celsius temperature to the nearest tenth (example: 23.8° Celsius). See "Output Formatting" in textbook section 3.9 for help. For 5 more points: Besides everything described above, also write a second program that prints out a °F to °C conversion table. Show temperatures from -50.0°F to 120.0°F in 10.0° increments.