We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0147d23 commit b549cd3Copy full SHA for b549cd3
Random Number/random.cpp
@@ -1,13 +1,11 @@
1
-#include <cstdlib>
2
-#include <ctime>
3
-#include <iostream>
+#include <bits/stdc++.h>
4
5
int main (int argc, char const* argv[])
6
{
7
srand((unsigned)time(0));
8
- int maior = 100;
9
- int menor = 30;
10
- int aleatorio = rand()%(maior-menor+1) + menor;
11
- std::cout << "Numero Aleatorio = " << aleatorio << std::endl;
+ int u = 100;
+ int d = 30;
+ int r = rand()%(u-d+1) + d;
+ std::cout << "Random Number = " << r << std::endl;
12
return 0;
13
}
0 commit comments