MENU
Question -

Write a user-defined function DisTen (int A[] [4], int N, int M) in C++ to find and display all the numbers, which are divisible by 10. For example if the content of array is :

12 20 13
2 10 30
The output should be
20 10 30



Answer -

void DisTen (int A[] [4] , int N, int M)
 {
 int i, j;
 for (i=0; i
 {
 for (j = 0 ; j
 {
 if (A[i][j]%10==0)
 cout << A [i] [ j] ;
 }
 }
 }

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
×