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.
Diff: main.cpp
- Revision:
- 27:f49a13e3c1b3
- Parent:
- 26:e7705b4a36bf
- Child:
- 28:39703e316712
--- a/main.cpp Sat Apr 11 20:47:59 2020 +0000
+++ b/main.cpp Sat Apr 11 21:33:41 2020 +0000
@@ -7,9 +7,9 @@
Serial com1(USBTX, USBRX);
void Matriz(void)
{
- cout<<endl;
- cout<<"Matriz aleatoria 0-255"<<endl;
- cout<<"**********************************************"<<endl;
+ com1.printf("\n");
+ com1.printf("Matriz aleatoria 0-255\n");
+ com1.printf("**********************************************\n");
srand(time(NULL ));
int matriz [10][10];
@@ -18,11 +18,11 @@
for (int columna = 0; columna < 10; columna++)
{
matriz[fila][columna] = 1 + rand() % 256;
- cout<<matriz[fila][columna]<<" ";
+ com1.printf("%d",matriz[fila][columna]);
}
- cout<<endl;
+ com1.printf("\n");
}
- cout<<"**********************************************"<<endl;
+ com1.printf("**********************************************\n");
}
int main()
{