diff --git a/Array/ARRAY SPIRAL PRINT (Clockwise) b/Array/ARRAY SPIRAL PRINT (Clockwise) index 33446d46..a9685e47 100644 --- a/Array/ARRAY SPIRAL PRINT (Clockwise) +++ b/Array/ARRAY SPIRAL PRINT (Clockwise) @@ -41,9 +41,9 @@ void Spiralprint( int a[][1000] , int m , int n){ } } int main(){ - int a[1000][1000] = {0}; int m,n; cin>>m>>n; + int a[m][n] = {0}; int val = 1; for(int row =0; row<= m-1; row++){ for(int col=0; col<=n-1; col++){ @@ -83,4 +83,4 @@ INput:- Output:- 11 12 13 14 15 Note:- In example 2 and example 3 we will get wrong Output but here due to modification(endRow>StartRow , endCol>StartCol) -we are getting right Output...... \ No newline at end of file +we are getting right Output......