Posts

Showing posts from October, 2018

Data Structure -1 (Arrays) Class 12 Computer Science

Image
Data Structure -1 (Arrays)  Class 12 Computer Science   1. Write a program to find the saddle points in a matrix. It is computed as follows: Find out the smallest element in a row. The saddle point exists in a row if an element is the largest element in that corresponding column. For instance, consider the following matrix          7   5  6          10  2  3          1   3   3 The saddle point results are listed below: a) In row 1, saddle point exists at column 2. b) In row 2, saddle point does not exist. c) In row 3, saddle point does not exist.   #include <iostream.h> #include <conio.h> void main() { clrscr(); int a[5][5]; int m,n,pos=0; cout<< "Enter matrix size (m X n) : " ; cin>>m; cout<< " X " ; cin>>n; int sad=0 ; cout<< "\nEnter matrix elements: \n" ; int min=100; //----------------------------------INPUT--------