Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
WeekAgenda
//g++ 7.4.0 //////////////////////////////////////////////////////////////////////////////// WeekAgenda: example of generating random weekly agenda //this code is created by Rezaul Hoque on May 30,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 <ctime> #include <string> class weekAge{ std::string m; public: weekAge(){} weekAge(std::string message){ m=message;} ~weekAge(){} weekAge(weekAge&c){m=c.m;} std::string getM(){return m;} void display(){ std::cout<<getM();} }; int main() { int l=6,index; srand(time(0)); index=rand()%7; weekAge* w; w=new weekAge[l]; w[0]=weekAge("Don't forget to send birthday wishes to your friend 'y' on Monday."); w[1]=weekAge ("Try hard to meet your monthly program target."); w[2]=weekAge ("Clean the floor,shelves,window edges with a good floor cleaning solution at least 4 times a week!"); w[3]=weekAge ("Water the plants every morning."); w[4]=weekAge ("Walk at least 30 minutes every day."); w[5]=weekAge ("Sleep well."); w[index].display(); return 0; }
run
|
edit
|
history
|
help
0
designated-inits
My Tuple class
Varadic macro
Pollard Rho Brent Integer Factorization - 11476 - Factorizing Larget Integers
ReplaceGreaterSum in BST
Deque RotateString
Good morning
Mr
Straight Max-Min
Date n Time Macros