In: Computer Science
ANS:
#include<string>
#include<vector>
#include<iostream>
using namespace std;
int main()
{
vector<float> vec;
float cube;
cout<<"Enter Values for
vector"<<endl;
float value;
for(int i=0;i<4;i++)
{
cout<<"Value:"<<i+1<<endl;
cin>>value;
vec.push_back(value);
}
//CUBE OF EACH VECTORE VALUE AND SUBTRACT BY
12.5
for(int i=0;i<vec.size();i++)
{
cube=vec[i]*vec[i]*vec[i]-12.5;
cout<<cube<<endl;
vec[i]=cube;
}
}
Comment down for any queries
Please give a thumbs up if you are satisfied with answer
:)