Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- yiato
- Date:
- 2020-04-11
- Revision:
- 4:164d791142ac
- Parent:
- 3:ba0abccd66c0
File content as of revision 4:164d791142ac:
#include "mbed.h"
Serial com1(USBTX, USBRX);
void practica(void); //declaración de funcion
//El primer void representa ... el tipo de funcion, en este caso tenemos una funcion void por lo tanto no esperamos un retorno de valor
//El segundo void representa ... el tipo de variable, en este caso tenemos variables void por lo tanto no debemos ingresar valor
int main()
{
practica();
}
void practica(void)
{
int numeros[10][10],filas=10,columnas=10,i,j;
for(i=0;i<filas;i++)
{
for(j=0;j<columnas;j++)
{
numeros[i][j]=rand() % 255 ;
}
}
com1.printf ("\nMostrando matriz\n\n");
for( i=0;i<filas;i++)
{
for( j=0;j<columnas;j++)
{
com1.printf("%5d",numeros[i][j]);
}
com1.printf ("\n");
}
}