miércoles, 25 de septiembre de 2019

Programa 22

#include "stdio.h"
#include "stdlib.h"
#include "time.h"
#include "iostream"

using namespace std;

int main (){

int randi, j;

srand(time(NULL));
cout<<"impresion de random"<<endl;
for (j=1;j<=15;j++)
{
randi=rand();
cout<<randi<<endl;
}
cout<<"impresion de random entre 100: "<<endl;
for(j=1;j<=15;j++)
{
randi=rand()/100;
cout<<randi<<endl;
}
cout<<"impresion de random entre 1000: "<<endl;
for (j=1;j<=15;j++)
{
randi=rand()/1000;
cout<<randi<<endl;
}
system ("PAUSE");
}

No hay comentarios.:

Publicar un comentario