jueves, 26 de septiembre de 2019

Porgrama 21

#include <iostream>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
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");

    return 0;
}

No hay comentarios:

Publicar un comentario

Cadenas

#include <iostream> #include <stdio.h> #include <string.h> using namespace std; char nombre[50],paterno[50],materno[20...