Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- void create(int a[]) //create and print array to check if results are accurate
- {
- int i;
- for (i=0; i<10; i++)
- {a[i]= rand();
- cout << a[i] << endl;}
- }
- int main() {
- int a[];
- create (int a[]);
- cout << "Press and enter a to set all cells to zero for the array. Press and enter b to square the "
- "value in every cell. Press and enter c to find the sum of the squares of the array. "
- "Press and enter d to 1 find the smallest index whose cell contains a value larger than "
- "that stored in: int v; (If no such index exists, it will return -1.) Press e to reverse the"
- "contents of a[]. Press f to print out its cycle." << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment