write a c program to find largest number in matrix(in each
row,each column, diagonally, and in the whole matrix)? Its
urgent.
Answer Posted / 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 |
Post New Answer View All Answers
Can you please explain the difference between malloc() and calloc() function?
What is the difference between a free-standing and a hosted environment?
Explain what is a program flowchart and explain how does it help in writing a program?
What are the disadvantages of external storage class?
How do you initialize pointer variables?
How can this be legal c?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
what is the function of pragma directive in c?
What is c programing language?
In c programming language, how many parameters can be passed to a function ?
what is ur strangth & weekness
What does emoji p mean?
What are extern variables in c?
What is the process of writing the null pointer?