1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#include <ctime>
#include <cstdlib>.
#include <iostream>
using namespace std ;
void setZero(int anyaaray[] , int arrSize) ;
void InputArray( int alpha[] , int AlphaarrSize ) ;
void doubleArray ( int alpha[] , int beta[] , int arraSize ) ;
void CopyGamma ( int inStock[] , int gamma [] , int InstouckArrayRows , int InstouckArrayCoulms , int GammaArraySize) ;
int main ()
{
int inStock[10][4];
int alpha[20];
int beta[20];
int gamma[4] = {11,13,15,17};
int delta[10] = {3,5,2,6,10,9,7,11,1,8};
srand (time(0)) ;
InputArray(alpha,20) ;
doubleArray ( alpha , beta , 20 ) ;
CopyGamma(inStock[10],gamma,10,4,4) ;
return 0 ;
}
void CopyGamma( int inStock[10] , int gamma[] , int InstouckArrayRows , int InstouckArrayCoulms, int GammaArraySize )
{
for (int i = 0 ; i < GammaArraySize ; i++ )
inStock[0][i] = gamma[i] ;
for ( int i = 1 ; i <= InstouckArrayRows ; i++ )
inStock[i][InstouckArrayCoulms] = 3*(gamma[GammaArraySize]) ;
}
|