Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <ctime>
- #include <cmath>
- using namespace std;
- int main(){
- srand(time(NULL));
- vector<int>vec;
- for(int i = 0; i < 10; i++){
- vec.push_back(rand());
- }
- for(int i = 0; i < vec.size(); i++){
- cout << "number: " << vec[i] << "\t cube: " << pow(vec[i],3) << "\t absolute value: " << abs(vec[i]) << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement