Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Microsoft Visual Studio C++ WIN32 project. Create it as a Console Application, and an Empty Project. Add a single .cpp file only, and

Create a Microsoft Visual Studio C++ WIN32 project. Create it as a Console Application, and an Empty Project. Add a single .cpp file only, and write the C++ code in that file to do the following:

1.Create an STL vector object, and store the first 30 Fibonacci numbers in the vector. Display the vector.

2.Create an STL list object and an iterator to go with it. Add 20 random numbers to the list. Display the list using the iterator. Sort the list with the STL sort() method (mylist.sort() for a list object called mylist). Display the list from smallest to largest, and then from largest to smallest using iterators.

3.Write a struct called orderedPair that includes two doubles, x and y. Create an STL list of orderedPair items. Populate the list with 10 pairs of random doubles, where each x and y is in the range 0.0 to 99.9 and has 1 decimal point of accuracy. Using an iterator, display the list in the format (x1, y1),(x2, y2), (x3, y3),.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

1 Apply the three-step writing process to persuasive messages

Answered: 1 week ago