Search:
Forum
Beginners
SOS idk how to declare this thing
SOS idk how to declare this thing
Oct 10, 2018 at 2:21pm UTC
EMA833060
(13)
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <valarray>
using namespace std;
int main()
{
val seed=let
val m=Date.minute(Date.fromTimeLocal(Time.now()))
val s=Date.second(Date.fromTimeLocal(Time.now()))
in Random.rand(m,s)
end;
int max, random_number;
cout << "please input max integer: ";
cin >> max;
srand(time(0));
random_number = (rand () % max) + 1000;
cout << random_number << endl;
system("pause");
return 0;
}
Oct 10, 2018 at 2:30pm UTC
helios
(17562)
When you double-post, you waste people's time.
http://www.cplusplus.com/forum/general/243937/
Oct 10, 2018 at 3:43pm UTC
EMA833060
(13)
you certainly found the time to leave a comment on this, I question the value of it.
Oct 10, 2018 at 4:32pm UTC
helios
(17562)
The value is that if someone else comes across this thread and wants to comment, they'll know to do it in the other thread, so as not to fragment the discussion.
You'd do well not to get snarky at people who are providing help for free.
Oct 10, 2018 at 4:43pm UTC
MikeyBoy
(5631)
For added fun, this is a triple post:
http://www.cplusplus.com/forum/windows/243938/
Because, apparently this user wanted to plumb new depths...
In any case, it's the thread in General where people are actually giving answers.
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs