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
- Fall '08
- Computer Science, Imperative programming, efore, Hartmut Kaiser, sub-directory called prog2