Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Project 4 v.3
//gcc 5.4.0 #include <stdio.h> int FindMax(int A[3][3]){ int MaxVal=A[0][0]; int x,y,n=3; for(x=0;x<n;x++) for(y=0;y<n;y++){ if(A[x][y]>MaxVal) MaxVal=A[x][y]; // printf("%d\n",MaxVal); } return(MaxVal); } int FindMin(int A[3][3]){ int MinVal=A[0][0]; int x,y,n=3; for(x=0;x<n;x++) for(y=0;y<n;y++){ if(A[x][y]<MinVal) MinVal=A[x][y]; // printf("%d\n",MinVal); } return(MinVal); } int FindColumnSum(int A[3][3],int y){ int x,sum=0,n=3; for(x=0;x<n;x++){ sum=sum+A[x][y]; // printf("%d\n",sum); } return(sum); } int FindRowSum(int A[3][3],int x){ int y,sum=0,n=3; for(y=0;y<n;y++){ sum=sum+A[x][y]; // printf("%d\n",sum); } return(sum); } //int FindArraAverage(int A[3][3]){ // } //int ColumnZeroAss(int A[3][3],int Cz[9]){ // } //int RowZeroAss(intA[3][3],int Rz[9]){ // } int main(void) { int A[3][3]={{1,2,3},{4,5,6},{7,8,9}}; // int Cz[9]; // int Rz[9]; int MaxVal; int x,y,n=3; printf("Maximum Value of the Array is %d\n",FindMax(A)); printf("Minimum Value of the Array is %d\n",FindMin(A)); for(y=0;y<n;y++){ printf("Column %d's sum=%d\n",y,FindColumnSum(A,y)); } for(x=0;x<n;x++){ printf("Row %d's sum=%d\n",x,FindRowSum(A,x)); } }
run
|
edit
|
history
|
help
0
child process
cstructCricket
MÓDULO 3, PREGUNTA 1, GUÍA 4
Float ispis
a
ele709 lab 3.4
C_141105_PuntosTriangulo
Practica 5 fibonacci
Project 5 v.02
tremendo codigaso ayudantia