Write a program that creates three vector
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”.
You'll get 1 file (3.1KB)
More products from WeCode
Assignment 1 Solution
Assignment 2 Solution
COP2805C –Java Programming 2 Project 2 Solution
Want to get updates from WeCode?