Practica_6_-_Ejercicio_03

Dependencies:   mbed TextLCD Keypad

Revision:
30:f7518060fc89
Parent:
29:734b61eca6df
Child:
31:080589c1250a
--- a/main.cpp	Wed Oct 16 00:42:26 2019 +0000
+++ b/main.cpp	Tue Oct 22 19:20:06 2019 +0000
@@ -1,23 +1,23 @@
 #include "mbed.h"
-DigitalOut red(LED1);
 Serial pc(USBTX,USBRX);
-DigitalIn boton1(PTC6);
-DigitalIn boton2(PTA4);
+
+
 int main(){
-    red=0;
-    while(1){
-        /*while(boton1 || boton2){
-            red = 1;
-            pc.printf("\nEstas presionando el boton :o");   
-        }
-        red=0;*/
-////////////////////////////////////////////////////////////////////
-        if(!boton1 || !boton2){
-            red =1 ;
-            pc.printf("\nEstas presionando el boton :o");
-        }
-        else{
-            red=0;
-        }
-    }
+    const int filas=3;
+    const int columnas=3;
+        int matriz [filas][columnas];
+        int i,j;
+        int contador=0;
+        
+    for (i=0;i<filas;i++)
+        {
+                for (j=0;j<columnas;j++)
+                    {   contador = contador+1;
+                        matriz [i][j]=contador;
+                         pc.printf("%d\t", matriz[i][j]);
+                        }
+                        pc.printf("\n");
+                    }
+        
+       
 }
\ No newline at end of file