finalreport2 - University of Cincinnati Department of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
University of Cincinnati Department of Computer Science CS 121-002 Computer Science 1 Laboratory 2 Final Report Benjamin D. Jones 16 January 2008 1. Introduction The purpose of this lab assignment is to learn how to develop C++ programs that use simple input and output statements, and assignment statements that include: expressions, integer variables, and constants. The lab will consist of two programs each accomplishing the same goal, but coded using different styles. The goal of each program is to take a positive integer as an input from the user, which represents the length of one side of a square, computer the area of that square, and display a meaningful message back to the user that indicates the results of the computation. 2. The Program(s) //******************************************************************** // File: lab2a.cpp // // Area of a square - User inputs a positive integer as the length L // of a square, and the program outputs the area of // that square // // // Author: Benjamin Jones // Created: 16 January 2008 // Updated: Original // // Assignment: 2.16 // Compiler: MinGW32 G++ 3.4.2 (GNU) // // Inputs: One arbitrary positive integer from the user // Outputs: Display message "The area of a square of length <L> is:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

finalreport2 - University of Cincinnati Department of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online