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:
- edwinjair
- Date:
- 2020-04-11
- Revision:
- 28:39703e316712
- Parent:
- 27:f49a13e3c1b3
File content as of revision 28:39703e316712:
#include "mbed.h"
#include <iostream>
#include <stdlib.h>
#include <time.h>
Serial com1(USBTX, USBRX);
void Matriz(void)
{
com1.printf("\n");
com1.printf("Matriz aleatoria 0-255\n");
com1.printf("**********************************************\n");
srand(time(NULL ));
int matriz [10][10];
for (int fila = 0; fila < 10; fila++)
{
for (int columna = 0; columna < 10; columna++)
{
matriz[fila][columna] = 1 + rand() % 256;
com1.printf(" %d",matriz[fila][columna]);
}
com1.printf("\n");
}
com1.printf("**********************************************\n");
}
int main()
{
Matriz();
}