Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Reminder
//g++ 7.4.0 //Reminder: a reminder to book club member; use of istringstream and istringstream; //this code is created by Rezaul Hoque on October 27,2021;contact: jewelmrh@yahoo.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 <sstream> #include <string> #include <iostream> void remind(std::string); void remind(std::string sval) { std::istringstream ist; std::ostringstream ost; ist.str(sval); std::string s,s2,s3; int m,m2,due; ist>>s>>m>>m2>>s2>>s3>>due; ost<<"Dear "; if (m) ost<<"Mr "; else { if(m2) ost<<"Miss "; else ost<<" Mrs "; } ost<<s<<",\nfrom "<<s2<<" "<<s3<<", we are updating our catalogue."; if(due) ost<<"Please clear your dues and pay update charge of Tk 100 by December.\n\n"; else ost<<"Please pay update charge of Tk 100 by December.\n\n"; std::string display=ost.str(); std::cout<<display; } int main() { remind("AAA 1 1 East City 1"); remind("BBB 1 0 West City 0"); remind( "ZZZ 0 1 North City 1"); remind("CCC 0 0 South City 0"); return 0; }
run
|
edit
|
history
|
help
0
random
Extended Euclidean Algorithm
Radix
Subset sum
div
series
Shortest path in binary tree
Dar
is_sorted_30-Seconds-of-C++
Treap (making range queries(that are not possible on seg_Trees) possible with no effort) : (863D)