Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
RandomMessage
//g++ 7.4.0 ////////////////////////////////////////////////////////////////////////////////RandomMessage: example of generating random message //this code is created by Rezaul Hoque on May 25,2022; //contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; /////////////////////////////////////////////////////////////////////////////// #include <iostream> #include <cstdlib> #include <ctime> #include <string> int main() { int n=3,index; srand(time(0)); index=rand()%3; std::string s[n]; s[0]={"Hi,there!"}; s[1]={"How are you?"}; s[2]={"How are you doing today?"}; std::cout<<s[index]; return 0; }
run
|
edit
|
history
|
help
0
arthi3.cpp
Memory_test
cache_node.cc
for.cc
Coin changes
Test 8(2020)
Rrrrrrrr
TypeSizeTest
cppPyPoly
Left view of a tree