Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include"stdafx.h"
- #include <iostream>
- /*
- you have a vector of size a[8] make the value of item 4 a power for all item and saize it in other new vector
- */
- using namespace std;
- int main()
- {
- int i, a[8], b[8];
- for (size_t i = 0; i < 8; i++)
- {
- cin >> a[i];
- }
- for (size_t i = 0; i < 8; i++)
- {
- b[i] = pow(a[i], 4);
- }
- for (size_t i = 0; i < 8; i++)
- {
- cout << b[i] << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment