martes, 5 de noviembre de 2019

Programa nuevo 5

#include <iostream>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
using namespace std;
int main()
{
    int aleatorio, j;
    srand(time(NULL));
    cout<<"Numeros random"<<endl;
    for (j=1; j<=30; j++)
    {
        aleatorio=rand()/1000;
        if(aleatorio>20)
     cout <<" "<<aleatorio<<endl;

 }
}

No hay comentarios.:

Publicar un comentario