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
What is a stream?
Should a function contain a return statement if it does not return a value?
What are the advantage of c language?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
Differentiate between the = symbol and == symbol?
What is your stream meaning?
Why we use void main in c?
swap 2 numbers without using third variable?
Write the Program to reverse a string using pointers.
Explain what is the benefit of using an enum rather than a #define constant?
Is there any demerits of using pointer?
What is data structure in c programming?
Explain how can I right-justify a string?
Is c is a middle level language?
write a program to rearrange the array such way that all even elements should come first and next come odd