write a c program to find largest number in matrix(in each
row,each column, diagonally, and in the whole matrix)? Its
urgent.
Answers were Sorted based on User's Feedback
Answer / azad sable, chiplun
/*pick up largest number fro 5*5 matrix/*
void main()
{
static int[5][5]={
{11,1,7,9,7},
{13,54,56,2,5},
{23,43,89,22,13},
{14,15,17,16,19},
{45,3,6,8,10}
};
int i,j,big;
clrscr();
big=a[0][0];
printf("\nThe 5*5 matrix in:\n");
for(i=0;i<=4;i++)
{
for(j=0;j<=4;j++)
{
printf("%d\t",a[i][j]_;
if(a[i][j]>big)
big=a[i][j];
}
printf("\n");
}
printf("\nlargest no. in matrix is%d"",big);
getch();
}
Is This Answer Correct ? | 51 Yes | 43 No |
Answer / sandip sen purkayastha
//Find the largest no. in matrix//
//This C program is implemented by SANDIP SEN PURKAYASTHA//
#include<stdio.h>
main()
{
static int a[3][3]={
{11,1,7},
{13,98,56},
{23,43,89},
};
int i,j,big;
big=a[0][0];
printf("The 3*3 matrix is:\n\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("%d\t",a[i][j]);
if(a[i][j]>big)
big=a[i][j];
}
printf("\n");
}
printf("\nThe largest no. in this matrix is: %d",big);
}
Is This Answer Correct ? | 13 Yes | 22 No |
what is diffrence between string and character array?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
To find whether a number is even or odd without using any conditional operator??
12 Answers College School Exams Tests, IBM,
How do I get a null pointer in my programs?
How do you use a pointer to a function?
i=10,j=20 j=i,j?(i,j)?i:j:j print i,j
hi send me sample aptitude papers of cts?
write a program to generate 1st n fibonacci prime number
Why calloc is better than malloc?
What does dm mean sexually?
write a program to print infinte number
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none