1.

Write a user-defined function in C++ to display those elements of a two dimensional array T[4][4] which are divisible by 100. Assume the content of the array is already present and the function prototype is as follows: void Showhundred(int T[4][4]);

Answer»

void Showhundred(int T[4][4])

{

for(int I = 0; I<4; I++)

{

for(int J = 0; J<4; J++)

{

if (T[I][J]%100 = = 0)

cout<<"Elemets which are divisible by 100 are:”

<<A[I][J]<<endl;

}

}

}



Discussion

No Comment Found

Related InterviewSolutions