Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Stream11
//g++ 7.4.0 ////////////////////////////////////////////////////////////////// //Stream11 //this code is created by Rezaul Hoque on July 28,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 <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; } void Menu(std::string na,int dineTime,int loc ){ static std::stringbuf buf; static std::ostream o(&buf); o<<" Welcome "<<na<<" to ***HomeMade Resto***"<<l; if(loc==1) o<<"Please note,TK 10 transport charge will be added for food delivery in Mirpur."<<l; else if(loc==2) o<<"Please note,TK 50 transport charge will be added for food delivery in Uttara."<<l; else if(loc==3) o<<"Please note,TK 50 transport charge will be added for food delivery in Banani and Gulshan."<<l; else if(loc==4) o<<"Please note,TK 100 transport charge will be added for food delivery in Puran Dhaka."<<l; else o<<"Sorry,our service is not available there at the moment."<<l; if(dineTime==1) o<<"3 pieces of roti,1 dal makhani,1 chicken soup,1 malai cha. Toal Tk 100."; else if(dineTime==2) o<<"1½ plates of rice,1 plate Malabar spinach,1 cup dal,1 plate rita fish.Total Tk 75."; else if(dineTime==3) o<<"2 pieces of naan, 1 plate of labra,1 cup faluda.Total Tk 90."; else o<<"Sorry,no other menu available! "<<l; std::cout<<buf.str()<<l; } int main() { fill('&'); Menu("Hao Mau Khaon", 3,4); std::stringstream s(" July 28, 2022"); std::string w; int c=0; while (s>>w) c++; std::cout<<"There are "<<c<<" words."<<l; fill('&'); return 0; }
run
|
edit
|
history
|
help
0
ONP is working!
sample
多态
Stats - Central Limit Theorem - Normal Distribution with multiple items
Test 13(2020)
search_n algorithm
Random Vector Generator
synowie abrahama
ListTel
Wipro Problem 1