0
how i can but maximum number in function for this program.
#include <iostream> using namespace std; void printMatrix(int matrix[2][2]){ for(int i=0;i<2;i++) { for(int j=0;j<2;j++) { cout<<matrix[i][j]<<" "; } cout<<endl; } } int main() { int matrix[2][2]={{4,8},{12,16}}; printMatrix(matrix); system("pause"); }
9 Antworten
+ 2
May be its typing error i dont know...but i take your question as "how i can put max. numbers in function in this program"
my answer is just increase your function accepting array size and also increase the value which u are goin to pass.....hope u understand....
+ 2
Ok gotcha..
writie this code like this one:-
int i, temp=0;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(temp>>a[i][j])
temp=a[i];
}
}
//here n=size of array...
hope it'll help.....
+ 1
good ans shreyas subhedar
+ 1
Ok thank you
But I want the if statement in function. So that the larger value of the matrix is extracted
+ 1
nice code shreyas subhedar!!!! keep it up
+ 1
sahi re bhava @shreyas
+ 1
Thanks Jerin and Saurabh .....
im glad that u like mah work yo!!!!
+ 1
see you today guys ;p
+ 1
vishay ka bhava!!! ;-)