Lab Assignment 2

Lab Assignment 2 - Objectives: String concatenation and...

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

View Full Document Right Arrow Icon
Lab Assignment 2 Objectives: String concatenation and constant reuse Using predefined libraries Formatting output, casting, and overloaded division Program 1: Concatenate, aka Lab2Pgm1 Although this is somewhat similar to the first program from Lab 1, it has some additional requirements. You should have two named string constants – one containing “Greetings “, and one containing “.\n”. You will need to use unnamed strings “from “ and “to “. You will need to ask the user for two variable strings, “Please enter receiver name: “, and sender. Your output will consist of two strings cconcatenated from the above six strings with the named strings used twice. Program 2: Power calculation, aka Lab2Pgm2 The user enters two numbers, for example, base = 5 , and power = 4 . The program repeats the input and calculates base power using the <cmath> library function pow() . For the example, the output should be 625. Program 3: Divider, aka Lab2Pgm3
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.

This note was uploaded on 06/28/2011 for the course CS 171 taught by Professor Ravi during the Spring '11 term at Minnesota.

Page1 / 2

Lab Assignment 2 - Objectives: String concatenation and...

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