Documentos de Académico
Documentos de Profesional
Documentos de Cultura
#include<iostream>
#include<ctime>
using namespace std;
int main()
{
cout << "EJEMPLO DE NUMEROS ALEATORIOS" << endl;
system("pause");
system("cls");
system("color 4");
srand(time(NULL));
for (int x = 1; x <= 5; x++) {
cout << "Estoy lanzando un dado: " << endl;
cout << rand() % 6 + 1 << endl;
}
system("pause");
return 0;
}
Funciones de c++
#include<iostream>