COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
test.cpp
Go to the documentation of this file.
1
#include <ctime>
2
#include <iostream>
3
#include <cstdlib>
4
using namespace
std;
5
6
int
random_num
(
void
){
7
return
rand() % 100;
8
}
9
10
int
main
(){
11
srand(time(NULL));
12
for
(
int
i = 0; i < 10; i++) {
13
cout <<
"Random number: "
<<
random_num
() << endl;
14
}
15
return
0;
16
}
random_num
int random_num(void)
Definition
test.cpp:6
main
int main()
Definition
test.cpp:10
Module7
test.cpp
Generated on Sun Sep 29 2024 16:39:53 for COMP2113 by
1.12.0