[SOLVED] Write a program that creates three vector<float objects

10.00 $

Categories: ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon VectorAdd.zip (3.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
đź”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Write a program that creates three vector<float objects. Fill the first two objects with 25 floating-point numbers using a for loop as follows:

1. fill the first vector object with the loop counter value;

2. fill the second vector object with the loop counter value squared;

3. finally, write a for loop that adds the corresponding elements in the first two vectors, and puts the result in the corresponding element of the third vector.

Display all three vectors using the format “for counter; element + element = element”.

  • VectorAdd.zip