# solved......................progra displaying

May 19th, 2015
Studypool Tutor
EDP School of Computer Programming
Price: \$15 USD

Tutor description

program .............................................................................................................

Word Count: 178
Showing Page: 1/3
Solved.#define numRows 3#define numCols 5void distinct(int arr[][numCols],int rowNumber) /*function to calculate distinct values*/{int i,j,k,size=5,distinct[5];for (i = 0; i < size; i++) {distinct[i]=arr[rowNumber][i];}/*reading elements one by one*/for (i = 0; i < size; i++) {for (j = i + 1; j < size;) {if (distinct[j] == distinct[i]) {for (k = j; k < size; k++) {distinct[k] = distinct[k + 1]; /*removing if it has repeated one*/}size--;} elsej++;}}printf("distinct elements of %d is\n",rowNumber);for (i = 0; i < size; i++) { /*printing back distinct values in array*/printf("%d\t",distinct[i]);}}int getRowNum(){int row;while(1){printf("Enter valid row number");/* until valid row number entered it asks infinitely*/scanf("%d",&row);if(row<=2){break;}else{printf("invalid row number");}}return row; /* returns user entered row number */}int

## Review from student

Studypool Student
" Excellent work as always thanks so much "

1820 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors