martes, 5 de noviembre de 2019

Programa 22

#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;

int main(){
system("color F0");
int randi;
srand(time(NULL));
cout<<"impresion de numeros random"<<endl;
for(int i=0; i<=15; i++){
randi=rand();
cout<<randi<<endl;
}
cout<<"impresion de numeros random entre 100"<<endl;
for(int i=0; i<=15; i++){
randi=rand()/100;
cout<<randi<<endl;
}
cout<<"impresion de numeros random entre 1000"<<endl;
for(int i=0; i<=15; i++){
randi=rand()/1000;
cout<<randi<<endl;
}
system("pause");
return 0;
}

No hay comentarios:

Publicar un comentario