# URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY

This is a discussion on URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY within the C++ forums, part of the Courses category; 4- Using the double dimension arrays declare the int arrays of dimension [4][5] and take the values input at run ...

1. ## URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY

4- Using the double dimension arrays declare the int arrays of dimension [4][5] and take the values input at run time and find out the minimum and sort them in descending order value from those inputted values....

2. ## Re: URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY

// This code is for compiler Turbo v4.5
#include<iostream.h>
void descend (int*,int*);
main()
{
int num[4][5];
cout<<"Enter Twenty Numbers :";
for (int i=0;i<4;i++)
{
for (int j=0;j<5; j++)
{ //two for loops for input values
cin>>num[i][j];
}
}
int smaller=num[0][0];
for (int row=0; row<4; row++)
{
for (int col=0; col<5; col++)
{
if (smaller>num[row][col])
{ // for finding smaller number
smaller=num[row][col];
}
}
}
cout<<"Smaller Number Is : "<<smaller<<endl ;

for (int pass=0; pass<20; pass++)
{
for (int k=0;k<4;k++) //for desecending order
{
for (int l=0; l<5; l++)
{
descend (&num[k][l],&num[k][l+1]);
}
}
}
cout<<"Descending Order Is :";
for (int m=0; m<4; m++)
{
for (int n=0; n<5; n++) //to display values ....
{
cout<<" "<<num[m][n];
}
}
cout<<endl;
return 0;
} // main ended
void descend (int *num1, int *num2)
{
if (*num1<*num2)
{
int temp;
temp=*num1;
*num1=*num2;
*num2=temp;
}
}

3. ## Re: URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY

thank youu very much .. yar.. kuch game ka programing ka baray ma batha do yar ... us ka logics kasay hothay ha ... thanx alot

4. ## Re: URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY

sorry yr.... kbi gaming ka code nhi deka..... maloom hogya tho zaroor bta 2nga..... aur aapko maloom ho jaye tho mjay bta dena.....

5. ## Re: URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY

ok yhanx yar tm apna email batana

6. ## Re: URGENT HELP NEEDED IN DOUBLE DIMENTION ARRAY

kia masla hy rat ky 12 han. kis ki dimension ko kia takleef hy ?