This preview shows page 1. Sign up to view the full content.
Unformatted text preview: of the numbers stored in a std::vector<double> . ( task2.cpp ). 3. ( 40% ) Write a program to calculate the squares of int values up to (but not including) 100. The program should write two columns: The first lists the value; the second contains the square of that value. Use the manipulator std::setw 1 ) to manage the output so that the values line up in columns ( task3.cpp ). 4. Bonus: ( 40% ) Write a program to count how many times each distinct word appears in its input, generate a table with 2 columns, one column listing the word, the second column should list the number of occurrences of that word ( task4.cpp ). All of the programs have to be compilable and, when run, should do the expected things. 1 as described here: http://www.cplusplus.com/reference/iostream/manipulators/setw/ , or in the book in §4.6...
View Full Document
This note was uploaded on 12/29/2011 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.
- Fall '08
- Computer Science