Documentos de Académico
Documentos de Profesional
Documentos de Cultura
h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
int arr[3][4],x,y;
float oper;
//a b c oper
//1 2 3 6
//2 3 4 9
//3 4 5 12
main(){
srand(time(NULL));
for (x=0; x<3; x++) //filas
for (y=0; y<3; y++) // columnas
arr[x][y]=1+rand()%9;
for(x=0;x<3;x++)
{
oper=0;
for (y=0; y<4; y++)
// oper=oper+arr[x][y];
oper=(arr[0][1]-arr[0][2])/arr[0][0];
arr[x][3]=oper;
}
for(x=0;x<3;x++)
{
printf("\n");
for (y=0; y<4; y++)
printf(" %d ", arr[x][y]);
}
return 0;
}
//Crear un arreglo
//float grupo[3];
// printf("\n");
// float ecuacion =0;
// for (i=0; i<3; i++){
// ecuacion+=grupo[i];
// }
// printf("la suma es %f", ecuacion);