Skip to content

Instantly share code, notes, and snippets.

@codepainkiller
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save codepainkiller/7c0a8c321090ee647f41 to your computer and use it in GitHub Desktop.

Select an option

Save codepainkiller/7c0a8c321090ee647f41 to your computer and use it in GitHub Desktop.
Números aleatorios - C++
#include <stdlib.h>
#include <time.h>
#include<iostream>
using namespace std;
int main()
{
int num, c;
srand(time(NULL));
for(c = 1; c <= 10; c++)
{
num = 1 + rand() % (11 - 1);
cout << num<< " ";
}
return 0;
}
@velosergio
Copy link

Hey Bro Thank You :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment