Write a program that creates three vector

10.00 $

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

You'll get a: . zip file solution, download link after Payment

Description

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”.