Guest User

Untitled

a guest
Nov 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. void create(int a[]) //create and print array to check if results are accurate
  6. {
  7.     int i;
  8.     for (i=0; i<10; i++)
  9.         {a[i]= rand();
  10.         cout << a[i] << endl;}
  11. }
  12. int main() {
  13.     int a[];
  14.     create (int a[]);
  15.     cout << "Press and enter a to set all cells to zero for the array. Press and enter b to square the "
  16.             "value in every cell. Press and enter c to find the sum of the squares of the array. "
  17.             "Press and enter d to 1 find the smallest index whose cell contains a value larger than "
  18.             "that stored in: int v; (If no such index exists, it will return -1.) Press e to reverse the"
  19.             "contents of a[]. Press f to print out its cycle." << endl;
  20.     return 0;
  21. }
Add Comment
Please, Sign In to add comment