Advertisement
bhok

Untitled

Jun 29th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. // function prototypes
  2. void arrayProgram(double ma[][2], int xSize);
  3.  
  4. int main()
  5. {
  6. const int arraySize = 5;
  7. double ma[arraySize][arraySize];
  8.  
  9. arrayProgram(ma, arraySize);
  10. }//end main
  11.  
  12. void arrayProgram(double ma[][2], int xSize)
  13. {
  14.  
  15.     int i = 0;
  16.  
  17.     for (i = 0; i < xSize; ++i)
  18.     {
  19.         ma[i][0] = rand();
  20.         ma[i][1] = (ma[i][0] * (20 / 25.0) + 64);
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement