Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Rand() in C++
ahmed0saber
Nov 5th, 2020
51
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C++
0.17 KB
| None
|
0
0
raw
download
clone
embed
print
report
#include <stdlib.h>
#include <iostream>
using
namespace
std
;
int
main
(
)
{
// from 0 to 4
int
a
=
rand
(
)
%
5
;
// from 1 to 5
int
b
=
rand
(
)
%
5
+
1
;
cout
<<
a
<<
endl
<<
b
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
MAKE $5000 INSTANTLY 5
JavaScript | 16 sec ago | 0.08 KB
Make $2500 in 15 minutes E
JavaScript | 21 sec ago | 0.08 KB
Make 3500$ in 20 MIN [Method] P
JavaScript | 33 sec ago | 0.08 KB
FREE BTC GUIDE E
JavaScript | 45 sec ago | 0.08 KB
✅ MAKE $22OO IN 10 MIN Q
JavaScript | 1 min ago | 0.08 KB
MAKE $5000 INSTANTLY Y
JavaScript | 1 min ago | 0.08 KB
MAKE $5000 INSTANTLY Y
JavaScript | 1 min ago | 0.08 KB
MAKE $5000 INSTANTLY W
JavaScript | 1 min ago | 0.08 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!