CSCI 261 - Programming Concepts (C++)

Fall 2017 - Lab 1D

Quick Links: Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |
This lab is due by Tuesday, August 29, 2017 11:59 PM .

Make it look pretty!



At the end of Lab1C, our program output looked something like:

Enter the dimensions of your box: 4 2 5
The volume of your box is: 40
Enter the radius of your circle: 3.2
The area of a circle with radius 3.2 is 32.1699

Which works, but we'd like to be more precise and make values easier to read. Specifically, we want to always display three decimal places and align the decimal points when outputting the results. Using the appropriate I/O manipulators, modify your program from Lab1C to match the following:

Enter the dimensions of your box: 4 20 5
Enter the radius of your circle: 3.2

Box volume:   400.000
Circle area:   32.170


Lab Submission



You will submit your solution to this lab with the first homework assignment. Detailed instructions for doing this are posted in Assignment 1.


This lab is due by Tuesday, August 29, 2017 11:59 PM .
Last Updated: 08/15/17 14:28


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0