Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
WeekAgenda2
//g++ 7.4.0 ////////////////////////////////////////////////////////////////////////////// //WeekAgenda2 //this code is created by Rezaul Hoque on August 01,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 <string> #include <ctime> #include <sstream> //stream manipulator std::ostream& l(std::ostream& os) { return (os<<"\n"); } void fill(char c) { std::cout.width(40); std::cout.fill(c); std::cout<<l; } 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() { fill('@'); std::stringstream sts; sts<<"August "<<01<<","<<2022; int k=6,index; srand(time(0)); index=rand()%7; weekAge* w; w=new weekAge[k]; 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(); std::cout<<l; std::cout<<sts.str()<<l; fill('@'); return 0; }
run
|
edit
|
history
|
help
0
Wygner aprendizado
P1
Minimum number of jumps DP
Baaad1
extern
Cotton Farm 0.0.1.0
Problema Siruri
scuba
SayHi
string probe