Practica_6_-_Ejercicio_02

Dependencies:   mbed TextLCD

Committer:
isaacross99
Date:
Tue Oct 22 19:20:06 2019 +0000
Revision:
30:f7518060fc89
Parent:
29:734b61eca6df
Child:
31:080589c1250a
matriz_3x3_221019

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan 0:7dec7e9ac085 1 #include "mbed.h"
rgsbuap 26:29f649949409 2 Serial pc(USBTX,USBRX);
isaacross99 30:f7518060fc89 3
isaacross99 30:f7518060fc89 4
isaacross99 29:734b61eca6df 5 int main(){
isaacross99 30:f7518060fc89 6 const int filas=3;
isaacross99 30:f7518060fc89 7 const int columnas=3;
isaacross99 30:f7518060fc89 8 int matriz [filas][columnas];
isaacross99 30:f7518060fc89 9 int i,j;
isaacross99 30:f7518060fc89 10 int contador=0;
isaacross99 30:f7518060fc89 11
isaacross99 30:f7518060fc89 12 for (i=0;i<filas;i++)
isaacross99 30:f7518060fc89 13 {
isaacross99 30:f7518060fc89 14 for (j=0;j<columnas;j++)
isaacross99 30:f7518060fc89 15 { contador = contador+1;
isaacross99 30:f7518060fc89 16 matriz [i][j]=contador;
isaacross99 30:f7518060fc89 17 pc.printf("%d\t", matriz[i][j]);
isaacross99 30:f7518060fc89 18 }
isaacross99 30:f7518060fc89 19 pc.printf("\n");
isaacross99 30:f7518060fc89 20 }
isaacross99 30:f7518060fc89 21
isaacross99 30:f7518060fc89 22
isaacross99 28:868b283c5f77 23 }